MATLAB: How to create a half cosine wave half cosine wave s=cos(t) for -pi/2 to pi/2 else 0 Best Answer If you are talking about plotting a half cosine wave you could do something like this:t=-pi/2:0.0001:pi/2;plot(t,cos(t)) Related SolutionsMATLAB: Amplitude of square wave What I have seen that, you b is look like as following-A=2; f=3;t=0:.01:10;a=A*sin(2*pi*f*t);%figure, plot(t,a);b=A*sin(2*pi*f*t) + A*sin(3*2*pi*f*t)/3+A*sin(5*2*pi*f*t)/5+A*sin(7*2*pi*f*t)/7;%[pks,locs]=findpeaks(b);%findpeaks(b)plot(t,b);Why donot go for peak analysis? Visit here and read here MATLAB: Sinewave generation:how generatea sine wave t=0:0.001:1; freq = 10; signal = sin( freq * 2 * pi * t); plot(t, signal); Related QuestionCosine Wave understanding ProblemGenerate sine wave with varying phaseHow to create sine wave from given square wave
Best Answer