how to get convolution for two signals without using conv command

조회 수: 9 (최근 30일)
so i have two signals the first is h = e^-3t and the another is g = e^-5t
i already done the convoloution of these two using the conv command but i need another method without the command.
any help?

채택된 답변

Jan
Jan 2022년 3월 13일
편집: Jan 2022년 3월 13일
If you read the documentation, you find the mathematical definition of conv:
doc conv
The code is easy to implement using loops. Try it. If you have specific problems, post your code here and ask for details.
If you spend the time for searching in the net (meta-message...), you find this also:

추가 답변 (2개)

Matt J
Matt J 2022년 3월 13일
You're probably meant to use the convolution property of FFTs.
  댓글 수: 2
mohammad yaman habra
mohammad yaman habra 2022년 3월 13일
no i have already tried this method as following :
>> t=1:0.1:10;
>> h= exp(-3*t);
>> g = exp(-5*t);
>> y = 0.1*conv(h,g);
>> plot(y)
and i need to do the same pocess but without the conv command
Matt J
Matt J 2022년 3월 13일
There are no FFTs in the code you've shown.

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


John D'Errico
John D'Errico 2022년 3월 13일
편집: John D'Errico 2022년 3월 13일
Several ways you could do this. If your signal is represented as a discrete sequence, then just use a double loop, accumulating the result into a vector of appropriate length.
If you were intended to work on the signals in symbolic form, then a z-transform can also be used for convolution.
syms t
ztrans(exp(-3*t))
ans = 
I showed that much to explain how to write an exponential. Note that the exponential you wrote will use the function exp in MATLAB.
Or, can you solve a convolution problem using the Laplace tranform? If this is a convolution INTEGRAL, as opposed to the sum implied by a discretized signal, then Laplace transforms would be appropriate.
laplace(exp(-3*t))
ans = 
You should see that both will be capable of computing the convolution of two signals, represented as functions. The Laplace transform applies to a convolution integral, a z transform to a discrete signal. My guess is, if you already did it using conv, then you would be intended to use a z-transform. (Hint.)

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by