plot subset of data

34 ビュー (過去 30 日間)
michael
michael 2020 年 5 月 11 日
回答済み: KSSV 2020 年 5 月 11 日
Hello,
(I'm using some old matlab :( )
I have a vector with 1000 values. From this values, I'd like to filter based on some value and then plot it as 'events'
For example, I have some numbers between 0 and 2*pi. I'd like to filter all values greater than 4 and plot them with x base 1:1000.
I'd be glad to have some clues.

採用された回答

KSSV
KSSV 2020 年 5 月 11 日
Let x,y be your values. Where x = 1:1000 and y lies in [0, 2*pi] ;
idx = y>4 ; % get indices of y which are greater than four
plot(x(idx),y(idx)) % plot

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R14SP1

Community Treasure Hunt

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

Start Hunting!

Translated by