Plotting from a for loop- discrete maps
古いコメントを表示
I'm just playing around with discrete maps (i.e. the logistic map). I seem to be having an issue plotting my data; It seems to only plot the last data point. Any suggestions?
function [x] = logistic(lambda,x0,n)
x(1) = x0;
for i= 1:n
x(i+1) = lambda*x(i)*(1-x(i));
z = [i,x(i)];
disp(z);
end
plot(z,'+');
end
Thank you in advance
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Measurements and Feature Extraction についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!