I have to draw a function like below
I need a cos function when its is between pi and 2*pi, and 0 function when it is between 0 and pi. Also I am trying to plot it for several periods:
syms tT=1/(n/60)if pi<=5*pi*t<=2*pi Qt = 0.001*cos(5*pi*t)if 0<5*pi*t<pi Qt=0endplot(t,Qt,[0, 5*T])
Could someone help me to fix this code, please
Best Answer