Re: [問題] 請問怎麼描述discrete signal已回收

看板MATLAB作者 (神無月 孝臣)時間17年前 (2008/10/29 00:06), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串3/3 (看更多)
※ 引述《nonname (荒唐)》之銘言: : 請問各位高手 : 在數位應用上 常常有delay的情況 這個node的信號是上個node的delay這樣 : 我都是直接用一個矩陣來描述信號 : 但會遇到這樣的問題 : x=[1 2 3 4 5 6 ] y(n)=x(n+2) y應該要 : y=[3 4 5 6 0 0 ] n = 2 ; y = circshift( x , [ 1 -n ] ) ; y( ( end - n + 1 ) : end ) = 0 : 但是我不能直接把x中的element往前移 因為y讀不到x(7) x(8) : 還有 : x=[1 2 3 4 5 6 ] y(n)=x(n-2) y應該要 : y=[0 0 1 2 3 4 ] n = -2 ; y = circshift( x , [ 1 -n ] ) ; y( 1 : -n ) = 0 : y讀不到x(-1) x(0) : 每次都要先想好再分段描述 : 有辦法簡潔的處理嗎? : 還有例如說要描述一段t=-5T開始的信號 小於零我也很頭大 : 大家都怎樣在矩陣裡描述小於零時的信號 : 先謝謝大家的回答 用if分兩個寫好了 n大於0與n小於0來區分兩種case -- Deserves death! I daresay he does. Many that live deserve death. And some die that deserve life. Can you give that to them? Then be not too eager to deal out death in the name of justice, fearing for your own safty. Even the wise cannot see all ends. Gandalf to Frodo -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.131.229.123

10/30 17:46, , 1F
謝謝!!!
10/30 17:46, 1F
文章代碼(AID): #191pXw4L (MATLAB)
文章代碼(AID): #191pXw4L (MATLAB)