use of for loop for time shift

3 views (last 30 days)
aa on 14 Aug 2020
I have a data set in two coloums, time and number of events. for every time we have to pick teh crossponding value from second coloumn. I did this by for loop at initial stage. Now I want to pick the number of events in two hours with a shift of one hours. For example, 1-2, 2-3,3-4,4-5 hour.
May someone help me here.
Thank you
Rafael Hernandez-Walls
Rafael Hernandez-Walls on 14 Aug 2020
If you have this data,
% shift of one hours
[x(1:n-1) y(2:n)]

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!