Azzera filtri
Azzera filtri

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

1 visualizzazione (ultimi 30 giorni)
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!!

Risposta accettata

Shunchao Wu
Shunchao Wu il 15 Nov 2011
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.

Più risposte (0)

Categorie

Scopri di più su Get Started with MATLAB in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by