How to plot two plots in one graph?

How can I plot "Chaotic_Balance(0.02, 9, 18, 1)" and "Chaotic_Balance(0.02, 10, 18, 1)" in one graph and label them like the picture shows below (red and blue line with descriptions)?

3 个评论

Use hold on after plot.
Pass Rd as vector
I used it in a new script, but it seemed not work as well. Why is it?
hi
it would be more efficient maybe if you could share the code (and the data if needed)

请先登录,再进行评论。

回答(1 个)

Place it just before the i-loop
figure()
hold on
for i = 1:Year
...
end
hold off % optional

类别

帮助中心File Exchange 中查找有关 Line Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by