Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

coloring the individual data in a plot

1 visualizzazione (ultimi 30 giorni)
mahesh bvm
mahesh bvm il 20 Set 2011
Chiuso: MATLAB Answer Bot il 20 Ago 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.

Risposte (1)

Grzegorz Knor
Grzegorz Knor il 20 Set 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')

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by