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

조회 수: 5 (최근 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일
편집: 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