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

 Akzeptierte Antwort

José-Luis
José-Luis am 9 Aug. 2017
Bearbeitet: José-Luis am 9 Aug. 2017

1 Stimme

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.

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

cgo
am 9 Aug. 2017

Bearbeitet:

am 9 Aug. 2017

Community Treasure Hunt

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

Start Hunting!

Translated by