How to plot graph for below mention mathamatical equation

ds/dt = A-BSI-(gamma+delta+theta+d)S
A=0.7
d=0.06
B=0.35
delta = 0.06
theta= 0.1
S= 20
I= 18
gamma = 0.1
and t= 50maximum
The graph is required to plot ds/dt or S(t) verses t .

3 件のコメント

darova
darova 2020 年 2 月 16 日
Can you integrate the equation?
jaypal singh
jaypal singh 2020 年 2 月 16 日
No
darova
darova 2020 年 2 月 16 日
please?

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

 採用された回答

Image Analyst
Image Analyst 2020 年 2 月 16 日

0 投票

Try this:
BSI = 1; % Just a guess since it was not specified.
% Define other constants that were given in the question.
A = 0.7
d = 0.06
B = 0.35
delta = 0.06
theta = 0.1
S = 20 % Capital S, not lower case s. It's a constant.
I = 18
gamma = 0.1
% The derivative (slope) is given as this constant:
dsdt = A-BSI-(gamma+delta+theta+d) * S
% Now integrate dsdt to get S as a function of t.
% First assume some t
t = linspace(-50, 50, 1000);
% Next assume some constant
someConstant = 10; % Whatever. I have no idea.
st = dsdt * t + someConstant;
% Taking the derivative of this st with respect to t will give dsdt.
% Now plot St.
plot(t, st, 'LineWidth', 2);
grid on;
xlabel('t', 'FontSize', 20);
ylabel('s(t)', 'FontSize', 20);

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMathematics についてさらに検索

製品

リリース

R2018b

質問済み:

2020 年 2 月 16 日

コメント済み:

2020 年 2 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by