Help with entry for Dirac delta function...

3 ビュー (過去 30 日間)
Fadi Zeineh
Fadi Zeineh 2019 年 5 月 12 日
コメント済み: Rena Berman 2019 年 5 月 13 日
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 :)!
  1 件のコメント
Rena Berman
Rena Berman 2019 年 5 月 13 日
(Answers Dev) Restored edit

サインインしてコメントする。

採用された回答

Sulaymon Eshkabilov
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
  1 件のコメント
Fadi Zeineh
Fadi Zeineh 2019 年 5 月 12 日
Thanks man!!!!!!:)
you saved us for today!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpectral Measurements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by