Hi all, im relatively new to the whole MATLAB thing and was wondering why my below code isnt working and giving me the error:
Check for missing argument or incorrect argument data type in call to function 'int'.
Error in MME32 (line 17)
c0=(1/T)*int(f1,T/2,0)+(1/T)*int(f2,0,T/2)
My Code:
cleart1=-pi:0.001:0;t2=0:0.001:pi;w=2;T=(2*pi)/w;f1=(4+t1)/2;f2=(2-t2).*cos(2*t2);hold onplot(t1,f1)plot(t2,f2)c0=(1/T)*int(f1,-T/2,0)+(1/T)*int(f2,0,T/2)
i also have the line of code:
c(n)=(1/T)*int(@f1.*exp(-j*n*w*t1),T/2,0)+(1/T)*int(@f2.*exp(-j*n*w*t2,0,T/2)
that doesnt work either.
Thanks in advance!
Best Answer