How to find mean in theta-direction?

5 ビュー (過去 30 日間)
Patcharawat Charoen-amornkitt
Patcharawat Charoen-amornkitt 2022 年 9 月 19 日
I have data store in [x,y,z] format where matrices x [100x100] and y [100x100] store the coordinates and matrix z [100x100] is the value I would like to average. Basically, I would like to create a 1D distribution of z in r-direction. However, I am not sure how to perform averaging in the theta-direction. Any help would be greatly appreciated

採用された回答

Matt J
Matt J 2022 年 9 月 19 日
編集済み: Matt J 2022 年 9 月 19 日
[theta,rho]=cart2pol(x,y);
G=discretize(rho,___); %fill in the blank with desired binning specs
zMean=splitapply(@mean,z(:),G(:));
  1 件のコメント
Patcharawat Charoen-amornkitt
Patcharawat Charoen-amornkitt 2022 年 9 月 19 日
This is perfect. Thanks a lot!

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by