How to print several matrices with different dimensions from a single line of code?

7 次查看(过去 30 天)
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):

采纳的回答

madhan ravi
madhan ravi 2020-7-4
编辑:madhan ravi 2020-7-4
ABC = {A, B, C};
[A, B, C] = ABC{:}
  3 个评论
Aryan Ritwajeet Jha
编辑:Aryan Ritwajeet Jha 2020-7-4
For (beginner) users with the same query, directly check out Stephen Cobeldick's comment. Thanks a lot Stephen!
I have accepted madhan ravi's answer, as technically, it did resolve my query. Thanks a lot madhan!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

产品


版本

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by