phasehistogram

phasehistogram(phases, amps, varargin)

PHASEHISTOGRAM Draw a polar histogram with mean-vector arrow for phase data

Usage:

[theta_mean, rho_mean, h_phist, h_pax, h_ml] = phasehistogram(phases, amps, …)

Inputs:

phases : 1xN double - phase values in radians – required amps : 1xN double - amplitudes per phase (default: ones(size(phases)))

Name-Value Pairs:

Any name-value pair accepted by polarhistogram is forwarded. Normalization defaults to ‘pdf’ if not specified.

Outputs:

theta_mean : double - mean angle of the resultant vector rho_mean : double - mean magnitude of the resultant vector h_phist : handle to the polarhistogram h_pax : handle to the polar axes h_ml : handle to the mean-vector line

Example

phases = mod(randn(1,1000) + pi/2, 2*pi); figure; phasehistogram(phases, 1, ‘NumBins’, 25, ‘FaceColor’, ‘blue’, ‘FaceAlpha’, .3);

See also: polarhistogram, polarplot

∿∿∿ Prerau Laboratory MATLAB Codebase · sleepEEG.org ∿∿∿