You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
This function calculates the mean and standard deviation of vectors in polar coordinates (and others), that is, from angles and magnitudes.
The usage is very simple:
For polar or cylindrical: Direction, Radius, Height
[mD,eD] = pmean(D);
[mD,mR,eD,eR] = pmean(D,R);
[mD,mR,mH,eD,eR,eH] = pmean(D,R,H);
For spherical coordinates: Azimuth, Elevation, Radius
[mA,eA] = pmean(A);
[mA,mE,eA,eE] = pmean(A,E,'s');
[mA,mE,mR,eA,eE,eR] = pmean(A,E,R,'s');
For cartesian coordinates:
[mX,eX] = pmean(X,'c');
[mX,mY,eX,eY] = pmean(X,Y,'c');
[mX,mY,mZ,eX,eY,eZ] = pmean(X,Y,Z,'c');
where "m" stands for MEAN's, and "e" for STD's.
Input angles should be in radians.
It ignores NaN's.
Enjoy it!
Any comments or bug reports will be very appreciated!
Cite As
Carlos Adrian Vargas Aguilera (2026). pmean.m v1.1 (Sep 2009) (https://www.mathworks.com/matlabcentral/fileexchange/19643-pmean-m-v1-1-sep-2009), MATLAB Central File Exchange. Retrieved .
Categories
Find more on Antennas, Microphones, and Sonar Transducers in Help Center and MATLAB Answers
General Information
- Version 1.1.0.0 (4.15 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
