Loop multiple plots single figure 3D matrix

3 visualizaciones (últimos 30 días)
Karl
Karl el 8 de Mayo de 2013
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.

Respuesta aceptada

Sean de Wolski
Sean de Wolski el 8 de Mayo de 2013
Editada: Sean de Wolski el 8 de Mayo de 2013
figure
hold on
for ii = 1:6
plot(gjG(11,:,ii));
end
hold off
  4 comentarios
Sean de Wolski
Sean de Wolski el 8 de Mayo de 2013
Vars contains strings for the names of the variables, not the variables themselves.
Vars = {GjG,gjR,etc...}
Karl
Karl el 8 de Mayo de 2013
Thanks, again :)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Annotations en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by