Error about A(I) = B?

1 visualización (últimos 30 días)
Villanova
Villanova el 30 de Mzo. de 2014
Comentada: dpb el 31 de Mzo. de 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)] =
control_forces(x(i),y(i),theta(i),Cc,xd_d(i),xdd_d,xddd_d,yd_d(i),ydd_d,yddd_d,t(i));
  1 comentario
dpb
dpb el 31 de Mzo. de 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
size(B)
to assign to an array unless you make it a cell array by encapsulating B in the curly braces "{}"

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by