matrix manipulation
Mostrar comentarios más antiguos
how to take matrix element (i.e row) one by one and save each new matrices in a new variable example:
original matrix: a=[2 6 7 8;4 5 3 7;9 7 6 9;5 3 1 9]
become: a1=[4 5 3 7;9 7 6 9;5 3 1 9] a2=[2 6 7 8;9 7 6 9;5 3 1 9] a3=[2 6 7 8;4 5 3 7;5 3 1 9] a4=[2 6 7 8;4 5 3 7;9 7 6 9]
Respuesta aceptada
Más respuestas (2)
Sean de Wolski
el 1 de Feb. de 2012
1 voto
Don't do it. That is all.
If you explain your end goal to us we can help you find a better way.
4 comentarios
eri
el 1 de Feb. de 2012
Jan
el 1 de Feb. de 2012
@eri: And this is more efficient and more flexible, if you use dynamic indices instead of a copy to a separate variable.
eri
el 1 de Feb. de 2012
Walter Roberson
el 2 de Feb. de 2012
Use cell arrays, as described in that FAQ entry.
eri
el 2 de Feb. de 2012
0 votos
1 comentario
Sean de Wolski
el 2 de Feb. de 2012
What does:
which -all arrayfun
return? And what is the output from:
ver
at the command line?
Categorías
Más información sobre Linear Algebra 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!