필터 지우기
필터 지우기

I want to make a convolution for two functions

조회 수: 11 (최근 30일)
Aya Emam
Aya Emam 2023년 6월 5일
댓글: Aya Emam 2023년 6월 5일
Just convolution, Fourier transform for y\(t)

답변 (1개)

Rahul
Rahul 2023년 6월 5일
Hi Aya,
We can use a following code snippet, to first perform operations to get m(t) in time-domain and then get y(t) using inverse fourier transform of the multiplication of fourier transforms of m(t) and h(t), since time-domain convolution is equivalent to frequency-domain multiplication.
% Symbols for time t and frequency w and constant A
syms t w A;
% Value of t has to be of form start:timestep:end, if required
% for substitution later
timeStep = 0.01;
% Expression for h(t)
h = heaviside(t) - heaviside(t - 1/A);
% Expressions for x1(t) and x2(t)
x1 = 0.1*A*sin(2*A*pi*t);
x2 = 1;
% Expression for m(t)
m = x1 + x2;
% Expression for Y(w), fourier transform of y(t)
Y = fourier(m) * fourier(h);
% Expression for final output y(t), inverse fourier transform of Y(w)
y = ifourier(Y, w, t)
You can refer to the fourier (Fourier Transform) or ifourier (Inverse Fourier Transform) function documentation for a better understanding of the above code.
  댓글 수: 1
Aya Emam
Aya Emam 2023년 6월 5일
Hi Rahul
Thanks in advance First if i want to plot y if A=10
second if i want H(w) and X1(w) and X2(w) and Y(w) how to compute it by matlab and draw it and
again again and again thanks in advance

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

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by