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

24 ビュー (過去 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
Aleksandrs Gumenuks 2018 年 12 月 9 日
I found stairs function useful for my purposes:
It is part of discrete plot methods summarized here:
PlotaSingleDataSeriesExample_01.png

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by