The question is:
'Using a for loop, create as many figure windows as there are rows in the matrix and plot the numbers from each row in a seperate figure window.'
I have a matrix with four rows, how do I go about doing this?

 채택된 답변

Ameer Hamza
Ameer Hamza 2020년 11월 30일

0 개 추천

Just use a for-loop. For example
M = rand(10, 40);
for i = 1:size(M,1)
figure();
plot(M(i,:));
end

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품

릴리스

R2020b

질문:

Liz
2020년 11월 30일

답변:

2020년 11월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by