How to find the value of a variable based on when another variable equals a certain number
2 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
回答(1 个)
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.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!