Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

coloring the individual data in a plot

1 visualización (últimos 30 días)
mahesh bvm
mahesh bvm el 20 de Sept. de 2011
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Can anyone please help me in How to plot a group of vectors which represents a bell shaped curve with different colours? I also want to know which color represents which vector.

Respuestas (1)

Grzegorz Knor
Grzegorz Knor el 20 de Sept. de 2011
Use hold all before plot and legend after. For example:
x = -6:.1:6;
hold all
for k=1:5
y = exp(-x.^2/k);
plot(x,y)
end
legend('a','b','c','d','e')

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by