i have one function, x = (e^-2t) cos (4t) u(t) and i
suppose to compute this fourier transform for the
continuous signal and plot the frequency spectrum. these
are the step that i figure out that can verified my answer that i
calculated myself (correct me if im wrong)
1- plot the signal
2- use fft command
3- use fftshift command
4- use stem command
but, in the first step, i did this..
>> fo = 2/pi; %the frequency
>> Fs = 100; %the sampling rate
>> Ts = 1/Fs; %sampling time interval
>> t = 0 : Ts : 1-Ts; %sampling period
>> n = length (t); %number of samples
>> y = (exp(-2*t))*cos(4*t);
??? Error using ==> mtimes
Inner matrix dimensions must agree.
i also tried this..
>> y = 3D(exp(-2*t)).*cos(4*t);
??? y = 3D(exp(-2*t)).*cos(4*t);
Error: Unexpected MATLAB operator.
and obviously the figure didnt come out. i tried other
command also but there are still errors.
how can i fix this? or are there any specific resources
that i can refer to? i already search at mathworks.com and this forum
and also some other signal and system books.