Borrar filtros
Borrar filtros

putting an exception in the plot command

1 visualización (últimos 30 días)
cgo
cgo el 9 de Ag. de 2017
Editada: José-Luis el 9 de Ag. de 2017
Hi.
I am plotting columns 1:20 except 5:7, how can I put in the plot command? Thanks

Respuesta aceptada

José-Luis
José-Luis el 9 de Ag. de 2017
Editada: José-Luis el 9 de Ag. de 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.

Más respuestas (0)

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by