Numeric Integration for Fourier Transform

3 visualizaciones (últimos 30 días)
ha9981
ha9981 el 2 de Dic. de 2012
I need to do a fourier transform of a function that I have only a vector for.
So given a vector y and time t.
t= linspace(0,5)
y was calculated using impulse()
How do I integrate:
Y(w) = int(y*exp(-j*w*t),t)
?
%System A: H(jw) = 2/(jw+2)
t = linspace(0,5);
num = [0 2];
den = [1 2];
sys_A = tf(num, den);
figure;
impulse(sys_A, t)
hA = impulse(sys_A,t);
for t1 = 1:length(t)
hA1 = hA(t1)*exp(-j*w*t1);
end
HA = trapz(t, hA1);
figure;
ezplot(HA)

Respuestas (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by