How to plot the “Response” and the “damping exponential function of the transient solution” on the same figure?
4 views (last 30 days)
Show older comments
how to plot the exponential curve like this pucture on the same figure ?
I have done this part of the code
-------
clear all;close all;
clc;
xss=0.01;
wf=40;
wn=20;
zeta=0.1;
A=0.1; B=0.04;
wd=wn*sqrt(1-zeta^2);
t=0:0.005:4;
X=xss*cos(wf*t)+(A*sin(wd*t)+B*cos(wd*t)).*exp(-zeta*wn*t);
plot(t,X,'r','LineWidth',2)
grid on
and i got this
------
i need it like this
0 Comments
Answers (1)
Mathieu NOE
on 6 Apr 2021
hello
If you have the Signal Processing Tbx, envelope was made for you
clear all;close all;
clc;
xss=0.01;
wf=40;
wn=20;
zeta=0.1;
A=0.1; B=0.04;
wd=wn*sqrt(1-zeta^2);
t=0:0.005:4;
X=xss*cos(wf*t)+(A*sin(wd*t)+B*cos(wd*t)).*exp(-zeta*wn*t);
plot(t,X,'r','LineWidth',2)
grid on
envelope(X, 100, 'peak')
0 Comments
See Also
Categories
Find more on Digital Filter Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!