How do I plot the values in an array against different values?

2 ビュー (過去 30 日間)
cg7aa
cg7aa 2013 年 10 月 23 日
回答済み: cg7aa 2013 年 10 月 24 日
I’ve got an array (P) produced using the following:
P0=0.350;
P=zeros(10000,200);
col=0;
format('long');
for k=[0.500:.0125:3.000];
col=col+1;
P(1,col)=P0+k*P0*(1-P0);
for i=[2:1:10000];
P(i,col)=P(i-1,col)+k*P(i-1,col)*(1-(P(i-1,col)));
I would like to plot the values in the last 200 rows of each column in P against a different number i.e. k value, example, plot the values in the last 200 rows of column 1 against 0.500, column two against 0.5125 and so on all on the same plot.
Thank you.

採用された回答

Neil Caithness
Neil Caithness 2013 年 10 月 23 日
Try this
plot(P(end-200+1:end,:),[0.500:.0125:3.000])
It's a nice looking tree plot. May be what you want.
  2 件のコメント
cg7aa
cg7aa 2013 年 10 月 24 日
Thank you sir, I haven't had the chance to re-run it yet but it sounds like you can see the bifurcation diagram I was looking for so hopefully it works!
Neil Caithness
Neil Caithness 2013 年 10 月 24 日

サインインしてコメントする。

その他の回答 (1 件)

cg7aa
cg7aa 2013 年 10 月 24 日
That's the one! Thanks. I've attached what I produced.

カテゴリ

Help Center および File ExchangeLanguage Fundamentals についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by