Help with entry for Dirac delta function...
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Fadi Zeineh
le 12 Mai 2019
Commenté : Rena Berman
le 13 Mai 2019
So I'm doing this project in a course called Linear systems in Mechanical Engineering..
and I'm in the very last question on the project which is to find the response/exit of the system to a given entry...
the system is defined by the Transfer function (found it as a part of the project):
sys=tf([-67500,-3*10^9,-654*10^9],...
[9.3555*10^21,5.0855*10^21,...
1.38199*10^23,6.5429*10^22,...
6.31808*10^21])
and the entry is a given by a graph which will be attached to the thread..
(the entry=0 when the time is negative)
and I'm not sure how to write a matlab code that plots the response for this exact entry!
Please help!
Thanks is advance :)!
Réponse acceptée
Sulaymon Eshkabilov
le 12 Mai 2019
Hi,
Here is a simple and short code to your problem:
% Given system's transfer function:
SYS=tf([-67500,-3*10^9,-654*10^9],[9.3555*10^21,5.0855*10^21,1.38199*10^23,6.5429*10^22,6.31808*10^21]);
% Generating Input Signal w.r.t. given signal (image shown in the problem)
t = linspace(0, 8, 1000); % Time space
U = [ 0 1 -1 1 1];
T = [0 2 6 6+1/1000 8 ];
IN = interp1(T, U, t);
figure
plot(t, IN, 'b--o'), title('Input Signal')
xlabel('t'), ylabel('u(t)'), grid on
% Computing the system response:
OUT = lsim(SYS,IN,t);
figure
plot(t, OUT, 'r', 'linewidth', 2), title('System Response')
xlabel('t'), ylabel('SYSTEM response'), grid on
Good luck
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Spectral Measurements dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!