フィルターのクリア

write a function about 'h=vo*t-(1/2)*g*t.^2'

1 回表示 (過去 30 日間)
kris mere
kris mere 2011 年 11 月 15 日
question about matlab I want to write a function about 'h=vo*t-(1/2)*g*t.^2'. h=100; vo=5:5:50; In order to get each 't' , how can I write a function such as 'fhandle=@(arglist) expression'? Do I have to put 't' at the left side of the equal sign? Also,I have to draw a 'vo-t' figure. Thanks for help!!

採用された回答

Shunchao Wu
Shunchao Wu 2011 年 11 月 15 日
Solve it directly,
t=(vo+-sqrt(vo^2-2*g*h))/g
if vo^2>2*g*h, there are two solutions, if vo^2=2*g*h, one solutiuo if vo^2<2*g*h, no solution.
  1 件のコメント
kris mere
kris mere 2011 年 11 月 15 日
thx a lot!!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by