Help using symolic variable
Mostrar comentarios más antiguos
I am trying to implement a piece of code:
n = 1000;
syms l;
m = sym('m', [ 1 n ] );
x = sym( 0 );
for i =1:1:n
J_j(1,i) = [ (1/3)*m(1,i)*l*l x x -(1/2)*m(1,i)*l;
x x x x;
x x x x;
-(1/2)*m(1,i)*l x x m(1,i) ];
end
Now, when I try to implement this code, it gives me following error:
??? Error using ==> mupadmex
Error in MuPAD command: Invalid index [list];
during evaluation of 'matchNonSingletonLHS'
Error in ==> sym.sym>sym.subsasgn at 1435
C = mupadmex('symobj::subsasgn',A.s,B.s,inds{:});
can anyone help?
Thank you so much in advance.
Respuesta aceptada
Más respuestas (1)
Alok
el 20 de Oct. de 2011
0 votos
Categorías
Más información sobre Common Operations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!