Download this file

30 lines (24 with data), 521 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function alpha = circ_axial(alpha, p)
%
% alpha = circ_axial(alpha, p)
% Transforms p-axial data to a common scale.
%
% Input:
% alpha sample of angles in radians
% [p number of modes]
%
% Output:
% alpha transformed data
%
% PHB 2009
%
% References:
% Statistical analysis of circular data, N. I. Fisher
%
% Circular Statistics Toolbox for Matlab
% By Philipp Berens, 2009
% berens@tuebingen.mpg.de - www.kyb.mpg.de/~berens/circStat.html
if nargin < 2
p = 1;
end
alpha = mod(alpha*p,2*pi);