How to make distubance like this?

조회 수: 2 (최근 30일)
Tu
Tu 2024년 1월 26일
댓글: Mathieu NOE 2024년 1월 29일
I want to make disturbance in matlab like this picture? How can I make it?

채택된 답변

Mathieu NOE
Mathieu NOE 2024년 1월 26일
looks like a square wave modulated by an decaying exponential envelope
fine tune the parameters to your own needs :
tau = 0.1; % exp decay rate
freq = 0.25; % square wave frequency
amp = 2000; % amplitude
Fs = 1e2; % sampling rate (>> at least 2*freq)
samples = 3000;
dt = 1/Fs;
t = (0:samples-1)*dt;
x = -amp*exp(-tau*t).*sign(cos(2*pi*freq*t)); % or use square function instead of sign(cos) if you have the signal processing tbx
plot(t,x)
  댓글 수: 2
Tu
Tu 2024년 1월 29일
Thank you so much, that's is what I need.
Best wishes to you.
Mathieu NOE
Mathieu NOE 2024년 1월 29일
as always, my pleasure !

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by