The equations for the fractal are given in the first picture. Here is my code for plotting them. I am having trouble actually plotting them onto the graph. Also, let's say I wanted to plot multiple graphs of this fractal, as shown in the second picture. How would I do this with a single for loop? Any suggestions?
% test code to plot the first graph
x(1)=0;y(1)=0;for k=[1:250]x(k+1)=(y(k)*(1+sin(0.7*x(k))))-1.2*sqrt(abs(x(k)));y(k+1)=0.21-x(k);endsubplot(2,2,1)plot(x(k),y(k))xlabel('x')ylabel('y')title('Fractal Plot with 250 points')
Best Answer