Excluding data from plot.

So lets say I only want to plot data points that fall between the range of 500 and 3000. How would I exclude the points that don't fit into these range. Sorry if this is super basic but I tried a few things and it didn't work. Thanks

 採用された回答

Wayne King
Wayne King 2012 年 1 月 23 日

0 投票

One thing you can do is to:
set(gca,'ylim',[500 3000]);
I assume you are talking about the y range, if not then use
'xlim'
Another thing you can do is to set any value outside this range equal to NaN. I'm not sure which works best for you. Can you provide a simple example of your use case?

その他の回答 (1 件)

Ross
Ross 2012 年 1 月 23 日

1 投票

Thanks Wayne! It was the ylim I was talking about.

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

タグ

質問済み:

2012 年 1 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by