How do you incorporate a Time Lag of 2 sec into a Time series plot?

1 view (last 30 days)
juan sanchez
juan sanchez on 19 Jan 2022
How do you incorporate a Time Lag of 2 sec into a Time series plot? Please see the two pictures. The first one seemed to be different to the one I am getting as it is shifting towards the right but the first one seems to be smaller. Do I need to have to apply that time lag effect also on the y-acis (in this case Cp time history) too?
Please see my code below:
% Time (zero lag)
t=0:dT:dT.*(length(Run3297data(:,1))-1);
% Time (with 2 sec lag)
t_2secLag=2+t
plot(t,Cp_raw_3sec(entire_time_history,195));
hold on
plot(t,C_p_movmean_3sec(entire_time_history,195).*(V_mean900sec^2./Vmovmean_3sec.^2),'LineWidth',2);
hold on
plot(t_2secLag,C_p_movmean_3sec(entire_time_history,195).*(V_mean900sec^2./Vmovmean_3sec.^2),'LineWidth',2);

Answers (0)

Community Treasure Hunt

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

Start Hunting!