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!