error in for loop
Mostrar comentarios más antiguos
i have the following code
clc
out=[3 4 5 6 7 8]'
out1=[1 2 3 4 5 6]'
for i=1:size(out)
for j =1:size(out1)
xlabel([ 'resp',num2str(out(i))])
ylabel([ 'resp',num2str(out1(j))])
end
end
for this i get only one graph with X axis label as 3 and y axis label as 1
i need six graphs with x ad y label as in out and out1 .please help
Respuesta aceptada
Más respuestas (1)
Jan
el 8 de Nov. de 2011
0 votos
At first replace "1:size(out)" by "1:numel(out)". SIZE replies a vector.
Do you want the different diagrams inside on figure or on different figures? Currently you set the labels of a single diagram 36 times, therefore I'm not sure how you want to distribute this to 6 diagrams.
1 comentario
FIR
el 8 de Nov. de 2011
Categorías
Más información sobre Axis Labels en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!