get the description of a LinProp

51 views
Skip to first unread message

dorscht...@gmail.com

unread,
Jan 23, 2019, 8:56:45 AM1/23/19
to METAS UncLib
Hi,

can I get the description of a LinProp in matlab?

In my example that would be 'test-description'.

>> a = unc(1, 0.1, 'test-description')
 
a = 
 
   (1 ± 0.1)
 
>> get_description(a)
Undefined function or variable 'get_description'.
 
>> 


Best regards

Philipp

michael.w...@metas.ch

unread,
Jan 23, 2019, 9:10:55 AM1/23/19
to METAS UncLib
Hi Philipp,

there is no wrapper method for MATLAB to get the descriptions. 

The workaround for that is to use the .NET object. See the following MATLAB code:

>> a = LinProp(1, 0.1, 'test-description');
>> b = LinProp(1, 0.1, 'test-description-2');
>> c = a + b;
>> cn = get_net_object(c)

cn = 

  UncNumber with properties:

           Value: 2
    Dependencies: [1×1 Metas.UncLib.LinProp.Misc.DependsOn[]]
        ExpValue: 2
        FcnValue: 2
         IsConst: 0
          StdUnc: 0.1414
            IDof: 0
         memsize: 32
            Zero: [1×1 Metas.UncLib.LinProp.UncNumber]
             One: [1×1 Metas.UncLib.LinProp.UncNumber]

>> cn.Dependencies.Length

ans =

  int32

   2

>> cn.Dependencies(1).Input.Description

ans = 

test-description

>> cn.Dependencies(2).Input.Description

ans = 

test-description-2



Regards
Michael

dorscht...@gmail.com

unread,
Jan 23, 2019, 9:27:50 AM1/23/19
to METAS UncLib
OK, thanks for the fast reply!
Reply all
Reply to author
Forward
0 new messages