How can i solve and plot this problem

1 回表示 (過去 30 日間)
esat gulhan
esat gulhan 2020 年 8 月 20 日
編集済み: esat gulhan 2020 年 8 月 20 日
syms D Do g H(t) t
Do=10
D=0.1
g=9.81;
eq=diff(H,t)==pi()*D^2/4*(2*g*H)^0.5/(pi()*Do^2/4);
cond=H(0)==2;
h(t)=dsolve(eq,cond)
When i try to solve this equation, my output is below
h(t) =
(981*(t/10000 + (20*109^(1/2))/327)^2)/200
(981*(t/10000 - (20*109^(1/2))/327)^2)/200
İ only want to get (981*(t/10000 + (20*109^(1/2))/327)^2)/200 value, i dont want second value( (981*(t/10000 - (20*109^(1/2))/327)^2)/200) and i want to plot in 0-100. How can i ?
I tried t=linspace(0,10,100)
plot(t,h)
it gives error,

採用された回答

Mario Malic
Mario Malic 2020 年 8 月 20 日
Use function fplot
fplot(f,[xmin xmax]); % plots f over the interval [xmin xmax].
  1 件のコメント
esat gulhan
esat gulhan 2020 年 8 月 20 日
編集済み: esat gulhan 2020 年 8 月 20 日
.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by