putting an exception in the plot command

1 vue (au cours des 30 derniers jours)
cgo
cgo le 9 Août 2017
Modifié(e) : José-Luis le 9 Août 2017
Hi.
I am plotting columns 1:20 except 5:7, how can I put in the plot command? Thanks

Réponse acceptée

José-Luis
José-Luis le 9 Août 2017
Modifié(e) : José-Luis le 9 Août 2017
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.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by