How do I plot an equation with multiple Iterations.
12 views (last 30 days)
Show older comments
Heather Worth on 2 Feb 2022
I need to plot the 500 iterations versus the iteration numbers, but with the code I'm using, it just gives me a blank graph.
Robert U on 2 Feb 2022
Hi Heather Worth,
you can store x1 each iteration in a vector and plot the vector at the end of the calculation.
x1(ik) = lambda*(x0^2)*(1-x0);
x0 = x1(ik);
Or you can plot each iteration on the fly.
fh = figure;
ah = axes;
x1 = lambda*(x0^2)*(1-x0);
x0 = x1;
Find more on Surfaces, Volumes, and Polygons in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!