plot figure from a vector saved from a for cycle
Show older comments
hi, i am saving a vector from a for cycle but when i try to plot all te saved value on the figure it appears just the last value of the plot.
this is the script
rep1 = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26];
for i = 1:length(rep1);
name=['TimeHistory_',int2str(rep1(i)), '.dat'];
fid = fopen( name, 'r');
if fid==-1;disp(msg);end [time,dispVR,dispVL,P15,Temp,RH,Fs]=importdata(fid);
[dispV,dispV_h,y01,y01_h,f_spec,f_v01,y01_h_m,zeta,zetair]= signalprocess1(time,dispVR,dispVL,P15,Temp,RH,Fs);
[U,Re,dinvisc,Umean]=reference (P15,Temp,RH);
peak = max(dispV) + abs(min(dispV));
RMS = sqrt(rms(dispV));
out (i,:) = [zeta zetair f_v01 Umean Re peak RMS];
Re_vec (i)= [Re];
Peak_vec (i)= [peak];
RMS_vec (i)= [RMS];
end
% Plot peak to peak over Re
figure()
plot(Re_vec (i), Peak_vec (i))
title('Peak to Peak Displacement')
legend('Peak to Peak', 's')
xlabel('Re')
ylabel('Peak to Peak, [mm]')
please help me
Accepted Answer
More Answers (0)
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!