MATLAB Answers

How can I solve this error 'Unable to perform assignment because brace indexing is not supported for variables of this type.'?

6 views (last 30 days)
talayeh tavangar
talayeh tavangar on 31 May 2020
Commented: talayeh tavangar on 31 May 2020
Hi
this is my code
for i=1:448
g{i}=[0:1:447]';
end
for i=1:448
U{i}=inv(K)*g{i};
end
but it doesnot work for U and I recieved this error Unable to perform assignment because brace indexing is not supported for variables of this type.' can you help me with that?

  4 Comments

Show 1 older comment
the cyclist
the cyclist on 31 May 2020
OK, so I made a good guess by making up a random 448*448 matrix. But the code above does not give an error.
There is something else causing the error. Maybe you defined U as something other than a cell array, earlier in the code?
talayeh tavangar
talayeh tavangar on 31 May 2020
yeah I have defines U as an other variable thanks for your help. How I want to use only element of (1,1) of each matrix that produce. can you help me with that?

Sign in to comment.


Translated by