急:拜託 訊號處理 的 計算

請問ㄧ下 如果 題目為y[n]-1/2y[n-1]=x[n]-1/4x[n-1]

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)

第一次碰到這科目有點不知所措,拜託各位老師

電腦計算的模擬雖然重要 ,但是手計算部份是我比較重視的,希望越清楚越好 ,可以作為我往後的參考資料謝謝 .

已更新項目:

可以 不用做 1500HZ.

但是要分題有點問題,5題都是連貫的,所以才會這麼長,拜託了 ~ 幫幫忙

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('time sequence n');

    ylabel('impulse responset');

    title('impulse sint[nt]');

    subplot(212)

    plot(ta_seq,sina);

    xlabel('time t');

    ylabel('Sin(t)');

    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('time sequence');

    ylabel('impulse responset');

    title('impulse response (filter)');

    subplot(212)

    stem(ts_seq,imp_resp1);

    xlabel('time sequence');

    ylabel('impulse response');

    title('impulse response(impz)');

    內容數字你在改過吧

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

    大大 你好~~~

    你的題目真多ㄝ

    你有即時或MSN嗎

    因為這樣比較好解釋

    也比較快~~~

    謝唷^^

    有就流一下吧^^

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

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

    • 登入以對解答發表意見
還有問題?馬上發問,尋求解答。