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

6 ビュー (過去 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 件のコメント
madhan ravi
madhan ravi 2020 年 7 月 4 日
Stephen 👌
Aryan Ritwajeet Jha
Aryan Ritwajeet Jha 2020 年 7 月 4 日
編集済み: 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 Center および File ExchangeCreating 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