Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

coloring the individual data in a plot

1 vue (au cours des 30 derniers jours)
mahesh bvm
mahesh bvm le 20 Sep 2011
Clôturé : MATLAB Answer Bot le 20 Août 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.

Réponses (1)

Grzegorz Knor
Grzegorz Knor le 20 Sep 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')

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by