frwmetric
frwmetric

Reputation: 41

what does "Attempt to reference field of non-structure array" error mean?

hi do you have any idea what does it mean? and how can I fix it

??? 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')

Upvotes: 3

Views: 36683

Answers (2)

Samuli Ulmanen
Samuli Ulmanen

Reputation: 2831

I don't know your function signature but I got this error when I passed a string in place of an array. Started thinking typing might not be such a bad idea after all.

Upvotes: 0

Eitan T
Eitan T

Reputation: 32920

Do you have any idea what does it mean?
??? Attempt to reference field of non-structure array.

You're trying to access a field in a variable which is not a structure, which might be one of the following four:

f.s
x.s
a.s
b.s

One or more of these variables (f, x, a or b) is not a structure, but you're trying to access a field in it as if it were.

Is there any difference between syms x and sym('x')?

No.
The official documentation states that syms is a shortcut for sym.

Upvotes: 4

Related Questions