putting an exception in the plot command

1 次查看(过去 30 天)
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
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 个)

类别

Help CenterFile Exchange 中查找有关 Line Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by