Getting x and y arrays of surf(z)

2 ビュー (過去 30 日間)
Rafael Madrid
Rafael Madrid 2014 年 10 月 8 日
コメント済み: Rafael Madrid 2014 年 10 月 8 日
Hi,
This might be a hard to explain question; I have an intensity array that I use to get a surf(Z) of a hemisphere. Is there a way to get the equivalent x and y arrays of these intensities, ie, if I were to surf(x,y,z) of these 3 I would get the same result? Maybe a different way of asking would be, can I split surf(Z) into surf(x,y,z) and get the same result. Because I need to have these x and y arrays also to compare my hemisphere to a matlab generated sphere. Thanks.
Raf

採用された回答

Guillaume
Guillaume 2014 年 10 月 8 日
If you've just generated your surface with
surf(z)
Then
[x, y] = meshgrid(1:size(z, 2), 1:size(z, 1));
  1 件のコメント
Rafael Madrid
Rafael Madrid 2014 年 10 月 8 日
Perfect. It was so obvious, I can't believe I missed it. thank you/

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

その他の回答 (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