Numeric Integration for Fourier Transform
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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)
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Discrete Fourier and Cosine Transforms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!