symbolic array, zero-based elements into another array
Mostrar comentarios más antiguos
if I have the following matrix:
syms x11 x21 x31 x41
a = [ 1*x11 2*x21 3*x31 3*x41]
b = [ 1*x11 2*x21 3*x41]
I want to generate a array which is c:
c = [1*x11 2*x21 0 3*x41]
is easy to do this however does not touch time with sym then forgot.
Thanks in advance.
Respuesta aceptada
Más respuestas (2)
Andrei Bobrov
el 9 de Nov. de 2011
syms x11 x21 x31 x41
a = [ 1*x11 2*x21 3*x31 3*x41]
b = [ 1*x11 2*x21 3*x41]
c = a.*ismember(a,b)
1 comentario
Artur M. G. Lourenço
el 11 de Nov. de 2011
Artur M. G. Lourenço
el 11 de Nov. de 2011
0 votos
Categorías
Más información sobre Symbolic Math Toolbox 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!