Error about A(I) = B?

1 view (last 30 days)
Villanova on 30 Mar 2014
Commented: dpb on 31 Mar 2014
Hi. I was wondering why I get this error
??? In an assignment A(I) = B, the number of elements in B and
I must be the same.
Error in ==> detection_control_3_19_2014 at 194
[f1(i) f2(i)] =
  1 Comment
dpb on 31 Mar 2014
Because they're not? (the same size, that is).
A(i) is an element of A, B is an array or vector.
You need an addressing expression on the left that's the same size as
to assign to an array unless you make it a cell array by encapsulating B in the curly braces "{}"

Sign in to comment.

Answers (0)


Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by