Help with entry for Dirac delta function...
조회 수: 4 (최근 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!