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 Kommentare

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

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Adam Danz
Adam Danz am 2 Feb. 2021
Bearbeitet: Adam Danz am 3 Feb. 2021

0 Stimmen

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

Kategorien

Mehr zu Line Plots finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 2 Feb. 2021

Bearbeitet:

am 3 Feb. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by