Borrar filtros
Borrar filtros

how to make a single plot with different colors?

1 visualización (últimos 30 días)
Arun Badigannavar
Arun Badigannavar el 17 de Abr. de 2013
x=1:10;
y=1:10;
plot(x,y)
How to make one color from 1 to 5 ,,,and 6 to 10 another plot?

Respuesta aceptada

Iman Ansari
Iman Ansari el 17 de Abr. de 2013
Hi
x=1:10;
y=1:10;
plot(x(1:5),y(1:5),'r')
hold on
plot(x(5:10),y(5:10),'g')

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D 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