Creating a new plot every time there is a gap in data

2 views (last 30 days)
Pouya on 19 Apr 2022
Commented: Pouya on 19 Apr 2022
I have two sets of data for a day worth of a staellite measurment. y is the measurment that the satellite does and x is lattitude that the satellite is in. Since there are more than one orbit per day the lattitude value recycles every orbit. I want to make a simple plot (or a series of plots) that starts displaying (x,y) from the beginning but when there is gap in data (represnting the recycled orbit) worth of lets say 5 [degrees], it starts a new plot and so on.
Pouya on 19 Apr 2022
My appologies I rushed posting this question I should've clarified my question better.
Basically let's say we have variable x = 1 2 3 4 5 6 ... 360 1 2 3 4 5 6 ... 360 1 2... and y= y1 y2 y3 ...yn
Plotting x vs y using plot(x,y) will show all y values vs x.
My question is, how can I plot these data so that when there is a gap between the values of data x larger than 1, for example, it saves the previous plot and start a new one where x(i=366) vs y(i=366) is the first data point of the new plot?

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!