'DFT와DTFT'에 해당되는 글 1건
- 2008.05.13 DSP_homework04
- DSP_homework04
- 예외처리
- 2008. 5. 13. 02:12
warning('off','MATLAB:dispatcher:InexactMatch')
% 4th Homework 'DFT Examples'
% (a). Find & draw |X(omega)|, |H(omega)|, |Y(omega)|
x = [ 1, 2, 2, 1];
h = [ 1, 2, 3];
y = conv (x, h);
magX1 = abs(hw4(x, length(x), 1));
magH1 = abs(hw4(h, length(h), 1));
magY1 = abs(hw4(y, length(y), 1));
figure('name', '(a) - |X(omega)|, |H(omega)|, |Y(omega)|', 'Position', [50, 350, 500, 300], 'MenuBar', 'none')
plot(magY1, 'DisplayName', 'magY1', 'YDataSource', 'magY1'); hold all; plot(magX1, 'DisplayName', 'magX1', 'YDataSource', 'magX1'); plot(magH1, 'DisplayName', 'magH1', 'YDataSource', 'magH1'); hold off; figure(gcf)
% (b) Find & draw |X(k)|, |H(k)|, |Y(k)|
x = [x, zeros(1,4)];
h = [h, zeros(1,5)];
y = [y, zeros(1,2)];
magX2 = abs(hw4(x, length(x), 2));
magH2 = abs(hw4(h, length(h), 2));
magY2 = abs(hw4(y, length(y), 2));
figure('name', '(b) - |X(k)|, |H(k)|, |Y(k)|', 'Position', [100, 300, 500, 300], 'MenuBar', 'none')
plot(magY2, 'DisplayName', 'magY2', 'YDataSource', 'magY2'); hold all; plot(magX2, 'DisplayName', 'magX2', 'YDataSource', 'magX2'); plot(magH2, 'DisplayName', 'magH2', 'YDataSource', 'magH2'); hold off; figure(gcf)
'예외처리' 카테고리의 다른 글
DSP_homework03 (0) | 2008.05.13 |
---|---|
DSP_homework02 (0) | 2008.05.13 |
DSP_homework01 (0) | 2008.05.13 |
Recent comment