what does this error mean?

조회 수: 1 (최근 30일)
frwmetric
frwmetric 2013년 5월 23일
hi do you have any idea what does it mean???
??? Attempt to reference field of non-structure array.
Error in ==> sym.symsum at 74
r = mupadmex('symobj::map',f.s,'symobj::symsum',x.s,a.s,b.s);
is it about my symbols which are
syms x y Mi q B alp
or summation of series...
Probably not easy to answer it with this insufficient information but my whole function consist multiple functions so not easy to introduce here...
And the last question is that is there any difference b/w
syms x & x=sym('x')

답변 (2개)

Iain
Iain 2013년 5월 23일
You will get that error if you set up a variable eg:
x = [];
and then try to access it using "dots", or getfield eg.:
x.s
To get rid of it, you need to delete the multiple ".s" you have in your code.

David Sanchez
David Sanchez 2013년 5월 23일
-As the message says, you are trying to get a field from a non-structure object. It seems either your x is not a structure or it does not have a .s field
"??? Attempt to reference field of non-structure array.
Error in ==> sym.symsum at 74 r = mupadmex('symobj::map',f.s,'symobj::symsum',x.s,a.s,b.s);"
- syms x & x=sym('x') Any of them work syms is usually used to declare multiple symbolic variables in a single call
ex:
syms x y z

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by