Info

この質問は閉じられています。 編集または回答するには再度開いてください。

coloring the individual data in a plot

1 回表示 (過去 30 日間)
mahesh bvm
mahesh bvm 2011 年 9 月 20 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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.

回答 (1 件)

Grzegorz Knor
Grzegorz Knor 2011 年 9 月 20 日
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')

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by