필터 지우기
필터 지우기

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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by