How can I plot cosine/sine wave with exponential function?

조회 수: 15 (최근 30일)
Wai Lau
Wai Lau 2020년 1월 10일
답변: Avinash Kumar 2022년 3월 25일
Hi all,
I have some rusty about plotting cosine/sine with exponential function, can someone help me with this function?
y(t)= -(1/2)cos(t)+(1/2)exp(-t)+(1/2)t*exp(-t)?
Thank you very much
Twinsen

답변 (2개)

Bhaskar R
Bhaskar R 2020년 1월 10일
Fs = 10000; % samples persecond
t = (0:1/Fs:1-(1/Fs)); % seconds
A = 1/2; % amplitude
y = -A*cos(t)+A*exp(-t)+A*t.*exp(-t); % your equation
plot(t, y), xlabel('Samples '), ylabel('Amplitude'); % plot signal
grid on

Avinash  Kumar
Avinash Kumar 2022년 3월 25일
Fs = 10000; % samples persecond t = (0:1/Fs:1-(1/Fs)); % seconds A = 1/2; % amplitude y = -A*cos(t)+A*exp(-t)+A*t.*exp(-t); % your equation plot(t, y), xlabel('Samples '), ylabel('Amplitude'); % plot signal grid on

카테고리

Help CenterFile Exchange에서 Discrete Fourier and Cosine Transforms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by