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

98 次查看(过去 30 天)
Would like this plot to show a series of steps...rather than interpolating linearly between points. -Andy
  1 个评论
Andrew Hunter
Andrew Hunter 2017-12-12
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

请先登录,再进行评论。

回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by