Sorting Graphs in a for loop
    5 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
Hi!, I am trying to plot some graph in the same window. The thing is that I want them to be sorted from bottom to top, right now I've got this
 tao=0.05
 figure1 = figure('Name','Response');                        
     t=0:tao:ttotal;   
    for i=1:np    
        subplot(np,1,i)          
        plot(t,q(i,1:h))        
        title(['Story ',num2str(i),''])        
        ylabel('x (cm)')        
        xlabel('t (seg)')        
        hold on;        
    end
So when it pops ups it says story 1, story 2.. I want them to be sorted story np, story np-1... story 1.
Hope You can help me
0 comentarios
Respuesta aceptada
  Walter Roberson
      
      
 el 29 de Jun. de 2013
        plotnum = np - i + 1
plot(t,q(plotnum,1:h))        
title(['Story ',num2str(plotnum),''])
0 comentarios
Más respuestas (0)
Ver también
Categorías
				Más información sobre Graphics Performance 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!

