Loop multiple plots single figure 3D matrix

조회 수: 3 (최근 30일)
Karl
Karl 2013년 5월 8일
Does anybody know how I can write the following commands in a loop
figure
hold on
plot(gjG(11,:,1));
plot(gjG(11,:,2));
plot(gjG(11,:,3));
plot(gjG(11,:,4));
plot(gjG(11,:,5));
plot(gjG(11,:,6));
hold off
gjG is an 11x8x6 matrix.

채택된 답변

Sean de Wolski
Sean de Wolski 2013년 5월 8일
편집: Sean de Wolski 2013년 5월 8일
figure
hold on
for ii = 1:6
plot(gjG(11,:,ii));
end
hold off
  댓글 수: 4
Sean de Wolski
Sean de Wolski 2013년 5월 8일
Vars contains strings for the names of the variables, not the variables themselves.
Vars = {GjG,gjR,etc...}
Karl
Karl 2013년 5월 8일
Thanks, again :)

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by