MATLAB: How to make the wave in the negative part disappear for loopif statementwhile loop t= linspace(0,6,100);y=sin(pi*t);plot(t,y) Best Answer More resolution for the values + logical indexing:t= linspace(0,6,5000);y=sin(pi*t);plot(t(y>=0),y(y>=0)) Related SolutionsMATLAB: How to plot a periodic signal f(t)= t.^3 , -pi<=t x = linspace(-2*pi,2*pi,1000);y = (mod(x+pi,2*pi)-pi).^3;plot(x,y) MATLAB: Plot the simple sin wave with amplitude y = 3*sin(x); Related QuestionDid all the online course progress disappearHow to plot this function
Best Answer