MATLAB: Won’t Matlab plot anything plot When I try to plot anything, nothing comes up. There are no errors, there's just nothing. >> x=-10:.1:10;>> y=sin(x);>> plot(x,y);No figure window pops up. Best Answer You may have previous plot open somewhere and Matlab is plotting it on the same figure. Check for open figures, you might find it.Alternatively, Use "close all" at the beginning and try again.close allx=-10:.1:10;y=sin(x);plot(x,y); Related SolutionsMATLAB: Is the line not showing up on the plot The loop does not work because x is not a vector after the loop. You have used x as the index variable, which is a scalar. Change your loop to this:x = 0:.1:10;y = zeros(size(x));for i=1:numel(x) y(i)= sin(x(i));endNow x is still a vector after the loop. MATLAB: Help needed plotting a graph You need to use ./, likey=sin(x).^2./x.^2HTH Related QuestionPlot the simple sin wave with amplitudeHow do i get the graph plottedPlot 2D graphAverage value of a graph after steady state has been reached.
Best Answer