How to get value of X based on a specific value of Y in Graph

5 次查看(过去 30 天)
How to get value of X based on a specific value of Y in Graph
for example
x = [ 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 ];
y= [ -77.4236 -91.4051 -105.387 -119.368 -133.35 -147.331 -161.313 -175.294 -189.276 -203.258 ]
and i have to find at what value of x i m getting y value of 100 or any negative value of Y.

采纳的回答

Walter Roberson
Walter Roberson 2020-10-27
x100 = interp1(y, x, 100, 'linear', 'extrap')
  7 个评论
Walter Roberson
Walter Roberson 2020-10-27
The left hand side should be a variable name that does not have to include the number. For example you could assign to xinterp or to x_at_negative_100

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

产品


版本

R2012a

Community Treasure Hunt

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

Start Hunting!

Translated by