Disable visual interpolation in plots

9 ビュー (過去 30 日間)
Matthias
Matthias 2012 年 4 月 27 日
Hi all, I've been looking for this for a while now:
I'd like to plot a sine wave to illustrate the process of sampling, resulting in something like this:
But when I plot a second of a sine wave (sampling rate 10 Hz), the plot line is visually interpolated between the sampling points.
Is there any way to achieve this?
Thanks in advance!

採用された回答

per isakson
per isakson 2012 年 4 月 27 日
There is a function named STAIRS. Doc says: "Stairstep graphs are useful for drawing time-history graphs of digitally sampled data."
  1 件のコメント
Matthias
Matthias 2012 年 4 月 27 日
How brilliant is this?! If I had only known what keywords to enter in the help doc.
Thanks a million!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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