How to find mean in theta-direction?

2 views (last 30 days)
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

Accepted Answer

Matt J
Matt J on 19 Sep 2022
Edited: Matt J on 19 Sep 2022
[theta,rho]=cart2pol(x,y);
G=discretize(rho,___); %fill in the blank with desired binning specs
zMean=splitapply(@mean,z(:),G(:));

More Answers (0)

Categories

Find more on Polar Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!