Help with entry for Dirac delta function...
3 次查看(过去 30 天)
显示 更早的评论
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 :)!
采纳的回答
Sulaymon Eshkabilov
2019-5-12
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
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spectral Measurements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!