I'm trying to subplot many signals with time in a single figure using subplot by using command 'hold on' in a for loop.
Ex: x is a structure with time
s=[];plotpos=0.85;for i=1:10; s(i)=subplot(10,1,i,'Position', [0.175, plotpos, 0.8, 0.115]); hold (s(i),'on'); grid on; plot(x.time,x.signals.values(:,i)) plotpos=plotpos-0.14;end
It deletes the previous subplots and adds a new one at next position instead of holding all previous subplots and adding new ones at new position.
Best Answer