MATLAB: How to get this graph graph I want to get the graph of n and x(n) on x(n+1)=2.5*x(n)*(1-x(n)), where x(1)=0.9 I wrote x(1)=0.9; for n = 1:100, x(n+1)=x(n)*(1-x(n))*2.5 plot (x(n),n) end and my plot is empty Best Answer Try thisx(1)=0.9;for n = 1:100x(n+1)=x(n)*(1-x(n))*2.5;endplot(x)In your code, you are just plotting one point at a time and then overwriting it with a new plot statement. Related SolutionsMATLAB: How can i display this sequence in a graph n=.05:.01:.3;x_n=(n.^2-1)./(n.^2);plot(n,x_n); MATLAB: What is the error in this code Explained at https://www.mathworks.com/matlabcentral/answers/332666-what-is-the-wrong-in-this#comment_442017 Related QuestionData plot with color
Best Answer