Finding contour level for given x,y coordinate

1 回表示 (過去 30 日間)
mukesh bisht
mukesh bisht 2021 年 8 月 23 日
回答済み: DGM 2021 年 8 月 23 日
Hi, I have a contour plot of velocity field. Now, I want to obtain velocity value from the contour plot for any given [X,Y] coordinate. How can i obtain this? Please help
Attached contour plot (x axis horizontal)

採用された回答

DGM
DGM 2021 年 8 月 23 日
Well, you already have the velocity data, so this shouldn't depend on the plot at all.
You can interpolate something like this:
% x and y values can't directly be used as subscripts
x = -50:50;
y = x;
v = peaks(101);
querypoint = [12.3 -17.7] % query point does not need to be integer-valued
querypoint = 1×2
12.3000 -17.7000
vint = interp2(x,y,v,querypoint(1),querypoint(2),'bilinear')
vint = -1.9433

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by