Will the matlab area plot have a zero order hold feature for the interpoloation method between points?

24 views (last 30 days)
Would like this plot to show a series of steps...rather than interpolating linearly between points. -Andy
  1 Comment
Andrew Hunter
Andrew Hunter on 12 Dec 2017
I know that there are other methods...I have used the interp1 function to create a new data set with a 'previous' interpolation method...but with a large quantity of data and potentially large differences between data points on the time axis, this requires a fairly small time step for the new data set (such that the plot appears to be using a zero order hold between points of the original data set, but the time steps are really just so small that it appears to be a vertical line), and thus it takes a lot of extra time.
But it would be nice if this feature was in the plotting method.
-Andy

Sign in to comment.

Answers (1)

Aleksandrs Gumenuks
Aleksandrs Gumenuks on 9 Dec 2018
I found stairs function useful for my purposes:
It is part of discrete plot methods summarized here:
PlotaSingleDataSeriesExample_01.png

Categories

Find more on Interpolation 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!