putting an exception in the plot command

Hi.
I am plotting columns 1:20 except 5:7, how can I put in the plot command? Thanks

 採用された回答

José-Luis
José-Luis 2017 年 8 月 9 日
編集済み: José-Luis 2017 年 8 月 9 日

1 投票

You could use setdiff() to do the indexing:
data = rand(10,20);
plot(data(:,setdiff(1:20,5:7)));
Please accept the answer that best solves your problem.

その他の回答 (0 件)

カテゴリ

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

タグ

質問済み:

cgo
2017 年 8 月 9 日

編集済み:

2017 年 8 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by