Plotting Multiple outputs from a function with multiple outputs

Hello,
I am attempting to plot a bifurcation plot for a function that has multiple outputs. How do I plot A vs h1 and A vs h2? Apparently, plot(A,[h1, ~], A, [h2,~]) is not supported syntax. I'd like to plot A vs h1 and A vs h2 on the same plot. Any suggestions?
A = linspace((1-p)*B*(1-C),1);
[h1,~] = bifurcation_host_pops(A);
[~,h2] = bifurcation_host_pops(A);

回答 (1 件)

CJ Vaughn
CJ Vaughn 2021 年 2 月 13 日

0 投票

Hi Maria,
It is my understanding that you are looking for an answer on how to combine multiple plots onto the same graph.
Using the code provided, the following commands can be used to achieve this result:
plot(A,h1)
hold on
plot(A,h2)
hold off
You can find more information in the documentation here:

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

製品

リリース

R2020b

質問済み:

2021 年 2 月 13 日

回答済み:

2021 年 2 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by