|
"J G" <jemma.geoghegan@gmail.com> wrote in message <i6t0d4$geq$1@fred.mathworks.com>...
> I have a table of data which I'd like to plot in a bifurcation diagram to illustrate equilibrium points (y-axis) and a changing parameter (x-axis). I don't think there is a function for this? Do I just use a general plot function to do this, changing my data into vectors? Thanks if you can help.
From Wikipedia, the free encyclopedia:
r_values=2.5:.001:4;
iterations_per_value = 500;
output_matrix = zeros(iterations_per_value,length(r_values));
for count = 1 : length(r_values)
r = r_values(count);
y = .5;
for i=1:500;
y = r*(y*(1-y));
end
for i=1:iterations_per_value
y = r*(y*(1-y));
output_matrix(i,count) = y;
end
end
plot(r_values,output_matrix,'.k');
grid on;
|