フィルターのクリア

Matlab plot , skip every 9,10,19,20, etc

1 回表示 (過去 30 日間)
RuiQi
RuiQi 2015 年 4 月 8 日
編集済み: RuiQi 2016 年 7 月 7 日
Hello forum
I have a vector of 160 values and would like to plot them but leave 2 unit spacing every 8 values. How can i achieve that ?

採用された回答

Star Strider
Star Strider 2015 年 4 月 8 日
One approach:
V = rand(1, 160)+1; % Create Data
Vm = reshape(V, 10, []); % Create Temporary Matrix
Vm([9, 10],:) = NaN; % Insert NaNs In Last 2 Rows
figure(1)
plot([1:160], Vm(:)) % Plot
grid
axis([xlim 0 3])

その他の回答 (1 件)

RuiQi
RuiQi 2015 年 4 月 8 日
Wow that is fast. Thanks !
  1 件のコメント
Star Strider
Star Strider 2015 年 4 月 8 日
My pleasure!

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by