x1=5;tau=0.1;k=1;while x(k)-x(k+1)>0.01 k=k+1; x(k+1)=x(k)-tau*(2*x(k)-2);endfigure(1)plot(x,'b*-.');grid;
MATLAB: Can someone tell me what is wrong with this
doesn't workhelpMATLABpleasewhile loop
doesn't workhelpMATLABpleasewhile loop
x1=5;tau=0.1;k=1;while x(k)-x(k+1)>0.01 k=k+1; x(k+1)=x(k)-tau*(2*x(k)-2);endfigure(1)plot(x,'b*-.');grid;
Best Answer