I'm trying to plot the information from my loops, but all I am getting is an empty plot. My code is as follows:
x1 = 1; while x1<19; y1(x1)=x1^3-(5*x1)^2+2^x1-10000*x1; x1=x1+1; endfor x2=1:20 y2(x2)=20000*log(x2)-3*x2; x2=x2+1;end%Create the plot
figure plot(x1,y1,'b-',x2,y2,'k-')
Best Answer