MATLAB: How to plot m(t)=cos(2*pi*9*t) 0 plotting how to plot m(t)=cos(2*pi*9*t) 0<t<3 and m(t)=0 otherwise Best Answer This works:m = @(t) cos(2*pi*9*t) .* ((t > 0 ) & (t < 3));t = linspace(-1, 4, 500);Out = m(t);figure(1)plot(t, Out)grid Related SolutionsMATLAB: Plotting multi-component signals t = [1:0.1:7]; epoch1 = 0.5*cos(pi*t) + 1.5*cos(4*pi*t) + 4*cos(5*pi*t); epoch2 = 0.7*cos(pi*t) + 2.1*cos(4*pi*t) + 5.6*cos(5*pi*t); epoch3 = 1.5*cos(2*pi*t) + 4*cos(8*pi*t); epoch4 = 1.5*cos(pi*t) + 4*cos(4*pi*t); epoch5 = 0.5*cos(pi*t) + 1.7*cos(2*pi*t) + 3.7*cos(5*pi*t); epoch6 = 2.3*cos(3*pi*t) + 7.8*cos(8*pi*t); epoch7 = 0.8*cos(pi*t) + cos(3*pi*t) + 3*cos(5*pi*t); y=[epoch1 epoch2 epoch3 epoch4 epoch5 epoch6 epoch7]; figure; plot([1:length(y)]*0.1,y)Hope this solves your query. MATLABhelper.com MATLAB: HI, i want to plot x=sin(t*pi) fuction like this picture for t[0:1:24] and x will be 0 when t=17 figure out what azzi was doing in the math which would lead you to figure out what to change.t=0:0.01:24y=sin(t*pi).*(t<15) + 3*sin(t*pi).*(t>=15)plot(t,y) Related QuestionPlotting quadratic f(t) = t^3How to plot this functionHow to create a fuction p(t)
Best Answer