MATLAB CODING - SIGNAL CONVOLUTION

조회 수: 2 (최근 30일)
long le
long le 2020년 10월 22일
편집: long le 2020년 10월 24일
I have a convolution operator as a linear system which transforms a signal x(n) into a signal y(n) through an impulse response h(n):
x(n)=[ 1 2 -2 4 6] and h(n)=[ -1 2 3]
I calculated manually the output y(n), represented the signal, and compared to MATLAB conv function as below:
Now, I would like to know how would it be possible to describe a matrix H so that: y=H.x
How to provide a corresponding code and make sure that from this equation?
I look forward to hearing from anyone.
Many thanks and Best regards!
  댓글 수: 1
Mathieu NOE
Mathieu NOE 2020년 10월 22일
Hi
I am not sure if I answer the question, but what you are doing is basically a FIR filter operation
your code could be much more compact by doing y = filter(h,1,x) with h = your impulse response function

댓글을 달려면 로그인하십시오.

채택된 답변

Bruno Luong
Bruno Luong 2020년 10월 22일
x=[ 1 2 -2 4 6];
h=[ -1 2 3];
c=conv(x,h)
M=convmtx(h,length(x))
x*M % return c

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matched Filter and Ambiguity Function에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by