How do i get periodic decaying impulse function using combination of sine and exponential functions

2 ビュー (過去 30 日間)
clc
clear all
n=1:1:5000;%1000 no of data points
fs=1000;%sampling frequency 0f 1000Hz
delt=1/fs;%sampling time interval
f=77;%frequency signal
t=n*delt;%time in seconds
totaltime=1000*delt;%length of time signal
y1=sin(pi*t);%77 Hz sine wave signal
for i = 1:77
if i<2
x=0.001:delt:(1/f);
y2=exp(-x)
else
x=((i-1)/f):delt:(i/f);
y2=exp(-x)
end
end

回答 (1 件)

KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 7 月 15 日
編集済み: KALYAN ACHARJYA 2019 年 7 月 15 日
I didnot go through your code, just read the title of the questions-
i get periodic decaying impulse function using combination of sine and exponential functions
t=0:.01:10;
A=20;
y1=A*sin(30.*t)
%Change ^the value as per requiremnet
y2=-exp(-2*t);
%........^
result=y1.*y2;
plot(t,result);
plot_mat.png

カテゴリ

Help Center および File ExchangeCorrelation and Convolution についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by