Numeric Integration for Fourier Transform
조회 수: 3 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!