Numeric Integration for Fourier Transform

2 visualizzazioni (ultimi 30 giorni)
ha9981
ha9981 il 2 Dic 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)

Risposte (0)

Categorie

Scopri di più su Programming in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by