How to retrieve z value from surf plot given x and y?

17 ビュー (過去 30 日間)
Kyle Gao
Kyle Gao 2018 年 9 月 19 日
コメント済み: Kyle Gao 2018 年 9 月 19 日
I got a surface useing:
s= surf(X, Y, Z)
Since the X, Y, and Z are discrete, I want to get the consecutive value of Z. For example, the origin data X and Y are all integers, and I don't the relationship between XY and Z, I want to get the z value where X = 1.87 and Y = 2.9. Is it possible? What should I do?

採用された回答

Cedric
Cedric 2018 年 9 月 19 日
編集済み: Cedric 2018 年 9 月 19 日
where Xq and Yq are defined using the values given in your question.
  3 件のコメント
Cedric
Cedric 2018 年 9 月 19 日
Unless I misunderstand your question, you can just set
Xq = 1.87 ;
Yq = 2.9 ;
and have Zq with
Zq = interp2( X, Y, Z, Xq, Yq ) ;
Kyle Gao
Kyle Gao 2018 年 9 月 19 日
Yeah! This solved my question perfectly!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by