How to find the value of a variable based on when another variable equals a certain number

2 ビュー (過去 30 日間)
lauuser1
lauuser1 2016 年 2 月 8 日
編集済み: lauuser1 2016 年 2 月 8 日
So what I'm trying to accomplish is to find the value of X right before Y is greater than D in my function
function [Result] = hw(D)
My X equation and my Y equation are
X = V.*T
Y = 0.5.*(9.81).*(T.^2)
Now I have to find X at the instance right before Y is greater than D. I would then have to incorporate that X into a vector so I made a new X called X_2. To solve X_2, I'd have to find the time (T) at which Y is less than D. If I do something like
T_ = (sqrt(2.*(Y)/9.81))
that would give me the T_ so I can put T_ into X_2, but how would I make it so I find the T right before Y is greater than D?

回答 (1 件)

Walter Roberson
Walter Roberson 2016 年 2 月 8 日
No you cannot do that. Your X and your Y have no computation in common, so it is meaningless to talk about an X before or after a particular Y.

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by