lovelykeiichi 發問時間： 社會與文化語言 · 1 0 年前

急:拜託 訊號處理 的 計算

assume all zero initial condition.

PS: x[o]=?y[o]=? 哪裡得知.

1. Generate the input signal x[n], which is a sinusoid of frequency500 Hz sampled at 6KHz

2.Compute the first four cycles of the output by directly implementing the above difference equation. Plot the input and output on the same

graph

3.Implement the above filter by using the MATLAB “filter” function. Compare your result with (2). Comment on your result

Plot the impulse response of the filter

4.The above filter is obviously an IIR filter; that is, the length of its impulse response is infinite. If we truncate this impulse response up to 32 points, then this impulse response can represent an FIR filter that approximate the given IIR filter. Let this FIR filter impulse response be represented by h1[n]. Find the output signal of the FIR filter by using MATLAB conv function. Compare your result with (2) and (3)

5.Generate a new input signal x[n], which is a summation of two sinusoids with frequency 500 Hz and 1500Hz sampled at 6 kHz. Repeat (3)

3 個解答

• 1 0 年前
最佳解答

第一題

500Hz at 6KHz

clear;close all

w=2*pi*500;

ta=1/(20e3);

ts=1/(6e3);

ts_seq=0:ts:0.008

ta_seq=0:ta:0.008

sins=sin(w.*ts_seq);

sina=sin(w.*ta_seq);

subplot(211)

stem(ts_seq,sins);

line(ts_seq,zeros(1,length(ts_seq)));

xlabel(&#39;time sequence n&#39;);

ylabel(&#39;impulse responset&#39;);

title(&#39;impulse sint[nt]&#39;);

subplot(212)

plot(ta_seq,sina);

xlabel(&#39;time t&#39;);

ylabel(&#39;Sin(t)&#39;);

line(ta_seq,zeros(1,length(ta_seq)));

第二題

clear;close all;

a=[1 0.5 0.25];

b=[1];

ts=1/(6e3);

ts_seq=0:ts:0.008;

x_imp=(ts_seq==0);

imp_resp=filter(b,a,x_imp);

imp_resp1=impz(b,a,length(ts_seq),ts);

figure

subplot(211)

stem(ts_seq,imp_resp);

xlabel(&#39;time sequence&#39;);

ylabel(&#39;impulse responset&#39;);

title(&#39;impulse response (filter)&#39;);

subplot(212)

stem(ts_seq,imp_resp1);

xlabel(&#39;time sequence&#39;);

ylabel(&#39;impulse response&#39;);

title(&#39;impulse response(impz)&#39;);

內容數字你在改過吧

參考資料： 之前的類似上課作業
• 登入以對解答發表意見
• 1 0 年前

大大 你好~~~

你的題目真多ㄝ

你有即時或MSN嗎

因為這樣比較好解釋

也比較快~~~

謝唷^^

有就流一下吧^^

參考資料： 0..0
• 登入以對解答發表意見
• Chaos
Lv 7
1 0 年前

你題目太多 答的好累 最好分幾個小題比較會有人答

• 登入以對解答發表意見