I want to use METAS UncLib from MATLAB, how it does work?

259 views
Skip to first unread message

Michael Wollensack METAS

unread,
Jun 5, 2014, 10:54:25 AM6/5/14
to unc...@googlegroups.com
I want to use METAS UncLib from MATLAB, how it does work?

Michael Wollensack METAS

unread,
Jun 5, 2014, 11:16:19 AM6/5/14
to unc...@googlegroups.com
Minimum software requirements:
- MATLAB R2010b
- Metas.UncLib V1.4.2
- Metas.UncLib.Matlab V1.4.4

MATLAB:
>> a = LinProp(3, 0.3)
Loading .NET Assembly: C:\Program Files (x86)\Metas\Metas.UncLib\Metas.UncLib.Core.dll
Loading .NET Assembly: C:\Program Files (x86)\Metas\Metas.UncLib\Metas.UncLib.LinProp.dll
Loading .NET Assembly: C:\Program Files (x86)\Metas\Metas.UncLib\Metas.UncLib.Optimization.dll
 
a = 
 
   (3 ± 0.3)
 
>> b = LinProp(4, 0.4)
 
b = 
 
   (4 ± 0.4)
 
>> c = sqrt(a.*a + b.*b)
 
c = 
 
   (5 ± 0.367151)
 
>> 

Michael Wollensack METAS

unread,
Jan 12, 2015, 7:45:56 AM1/12/15
to unc...@googlegroups.com
I released a single installer for METAS UncLib V1.4.8.

Minimum software requirements:
- MATLAB R2010b
- METAS UncLib V1.4.8, see www.metas.ch/unclib

Jan Grajciar CMI

unread,
Aug 1, 2017, 8:36:30 AM8/1/17
to METAS UncLib
Hi Michael,
is it possible to enter a name (description) in MATLAB when defining a variable? So that I can see the origin of the uncertainty in the overview (unc_budget).

Thanks
Jan
LinProp_description.png

Jan Grajciar CMI

unread,
Aug 1, 2017, 1:01:21 PM8/1/17
to METAS UncLib
for example, for complex variables. I tried to modify the notation for non-complex numbers a = LinProp(3,4,'name'), but I did not find the appropriate notation

While setting the 'Value' property of 'GuiUncBudget':
Value must be 'Metas.UncLib.LinProp.UncNumber'.

 and I did not find it in the documentation https://www.metas.ch/dam/data/metas/Fachbereiche/Hochfrequenz/UncLib/Metas.UncLib.Matlab.UserReference%20V1.8.pdf

Michael Wollensack METAS

unread,
Aug 8, 2017, 11:14:24 AM8/8/17
to METAS UncLib
Hi,

You can do it like that:

>> a = LinProp(3, 0.3, 'a');
>> b = LinProp(4, 0.4, 'b');
>> c = sqrt(a.*a + b.*b);
>> d = a + 1i.*b;
>> e = abs(d);
>> unc_budget(c)
>> unc_budget(e)

Hope this helps!

Regards
Michael

Jan Grajciar CMI

unread,
Aug 9, 2017, 2:27:45 AM8/9/17
to METAS UncLib
Hi,
and how would it look like for a matrix of complex numbers?

 LinProp([complex value], [covariance],(description))

Thanks
Jan

Michael Wollensack METAS

unread,
Aug 11, 2017, 10:54:16 AM8/11/17
to METAS UncLib
Hi,

yes with METAS UncLib V1.8.2 or newer:
- ComplexUncNumber, RealUncArray and ComplexUncArry with description added, unc(value, [covariance], description).

See the following example:

>> a = LinProp([3 4], [0.09 0; 0 0.16], 'Triangle')
 
a.value = 
 
     3     4

a.standard_unc = 
 
    0.3000    0.4000

>> unc_budget(abs(a(1) + 1i.*a(2)))
 


Hope this helps.

Regards
Michael

Jan Grajciar CMI

unread,
Aug 21, 2017, 1:00:45 PM8/21/17
to METAS UncLib
Hi,
thank you very much, it helped. I used the older version of Metas UncLib, that did not allow it. I have one more question. Is it also possible to name the individual 'Triangle' components in the definition a = LinProp([3 4], [0.09 0; 0 0.16], 'Triangle'....?

Thanks
Jan

Michael Wollensack METAS

unread,
Aug 22, 2017, 2:29:34 AM8/22/17
to METAS UncLib
Hi,

> Is it also possible to name the individual 'Triangle' components in the definition a = LinProp([3 4], [0.09 0; 0 0.16], 'Triangle'....?

No. If you define the input quantities with a covariance it's not possible. The reason is that you could have correlation. Lets assume you would have full correlation then your covariance matrix would look like that:
[0.09 0.12; 0.12 0.16]
Then you would have only one contribution instead of two.

If you've no correlation then you could to it like that:

a1 = LinProp(3, 0.3, 'Triangle\ta1')
a2 = LinProp(4, 0.4, 'Triangle\ta2')
Reply all
Reply to author
Forward
0 new messages