using LinProp with 0 value, on Matlab

67 views
Skip to first unread message

lucas corach

unread,
Aug 10, 2017, 1:38:10 PM8/10/17
to METAS UncLib
Dear Michael:

     I'm finding an issue when I try to declare a LinProp
 variable with value zero, or with imaginary or real part with value zero.
 An error message appears when I try to do this, this one: 

"No constructor 'Metas.UncLib.LinProp.UncNumber' with matching signature found.

Error in LinProp (line 100)
                                obj.NetObject = Metas.UncLib.LinProp.UncNumber(varargin{1}, varargin{2});"


I use "eps" in Matlab to declare something that should have the value zeros,
but I want to know if there´s a better way to do it.

Thank you.

Lucas

Michael Wollensack METAS

unread,
Aug 11, 2017, 10:43:55 AM8/11/17
to METAS UncLib
Hi Lucas,

I would be helpfull if you could post the command which generates the above error. Otherwise I have to guess.

>> a = LinProp(0, 0)
 
a = 
 
   (0 ± 0)

>> b = LinProp(0+1i.*0, [0.4 0; 0 0.4])
Error using Metas.UncLib.LinProp.UncNumber
No constructor 'Metas.UncLib.LinProp.UncNumber' with
matching signature found.

Error in LinProp (line 100)
                                obj.NetObject =  Metas.UncLib.LinProp.UncNumber(varargin{1}, varargin{2});

b is not working because there is no way in MATLAB to detect if the value is complex.

>> c = LinProp(0+1i.*eps, [0.4 0; 0 0.4])
 
c = 
 
   (0 ± 0.632456) + (2.22045e-16 ± 0.632456)i

c is somehow your workaround with eps.

>> d = LinProp([0 0], [0.4 0; 0 0.4])
 
d.value = 
 
     0     0

d.standard_unc = 
 
    0.6325    0.6325

>> e = d(1) + 1i.*d(2)
 
e = 
 
   (0 ± 0.632456) + (0 ± 0.632456)i

e is a workaround over a vector.

Hope this helps.

Regards
Michael
Reply all
Reply to author
Forward
0 new messages