How to print several matrices with different dimensions from a single line of code?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Aryan Ritwajeet Jha
el 4 de Jul. de 2020
Editada: madhan ravi
el 4 de Jul. de 2020
Input (randomly chosen):
A=ones(4);
B=magic(5);
C=hilb(6);
Is there an easy method to print all of the matrices from a single line of code (instead of leaving those semi colons off)? Please note that I do not want them manipulated and/or concatenated in any way.
Desired output for the above input is given here (obtained here, by leaving the semi colons off):
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/326723/image.png)
0 comentarios
Respuesta aceptada
madhan ravi
el 4 de Jul. de 2020
Editada: madhan ravi
el 4 de Jul. de 2020
ABC = {A, B, C};
[A, B, C] = ABC{:}
3 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!