Assign variables to positions in matrix
Mostrar comentarios más antiguos
I'm sure this is a stupid question, but how does one define variables as positions in a matrix? For example, in matrix algebra, if I set up a matrix equation such that B=inv(A)*C, how can I define x and y such that B=[x;y]?
Respuesta aceptada
Más respuestas (1)
Sean de Wolski
el 25 de Mzo. de 2011
B = [3;4]; %column vector
B = [3 4]; %row vector
B = [1 2; 3 4]; %2x2 matrix.
Ps
B = A\C; %is better than inv(A)*C
2 comentarios
Patrick Star
el 31 de Mzo. de 2011
Sean de Wolski
el 31 de Mzo. de 2011
Note the difference in our slashes \/!
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!