Printing of 1000 matrix .

조회 수: 2 (최근 30일)
Deepesh Kumar Gupta
Deepesh Kumar Gupta 2021년 9월 18일
댓글: Deepesh Kumar Gupta 2021년 9월 25일
How can i print 1000 matrix of (12, 1) from (1000, 12) matrix and gives to name of each 1000 matrix.
  댓글 수: 1
Image Analyst
Image Analyst 2021년 9월 18일
I have no idea what this means. Perhaps take another shot at phrasing it. Are you saying you have 1000 matrices, all with different names, like m1, m2, m3, ..... up to m1000? And each one is either a 12 row column vector or a 1000 row-by-12 column matrix?
Also, print where? To the command window? Directly to the paper printer?

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2021년 9월 18일
Note that in the below, Row1, Row2, and so on are only for display purposes. The code does not create matrices by those names.
YourMatrix = randi(9, 10, 4);
for K = 1 : size(YourMatrix,1)
fprintf('\nRow%d = \n', K);
disp(reshape(YourMatrix(K,:), [], 1));
end
Row1 =
4 7 5 8
Row2 =
5 7 8 2
Row3 =
8 6 5 6
Row4 =
9 8 6 7
Row5 =
9 4 9 4
Row6 =
1 7 1 7
Row7 =
3 9 1 3
Row8 =
2 5 5 1
Row9 =
9 6 1 3
Row10 =
5 8 5 8
  댓글 수: 1
Deepesh Kumar Gupta
Deepesh Kumar Gupta 2021년 9월 25일
Thank you for your effort but i didn't find my solution.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by