standardizePolar

PURPOSE ^

sort polar data and ensure polar angle in [0, 2pi)

SYNOPSIS ^

function [polarAngle, polarDistance, permutationVector] =standardizePolar(polarAngle, polarDistance)

DESCRIPTION ^

 sort polar data and ensure polar angle in [0, 2pi)

 THIS IS NO USER FUNCTION

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [polarAngle, polarDistance, permutationVector] = ...
0002     standardizePolar(polarAngle, polarDistance)
0003 % sort polar data and ensure polar angle in [0, 2pi)
0004 %
0005 % THIS IS NO USER FUNCTION
0006 
0007 % The elk-library: convex geometry applied to crystallization modeling.
0008 %   Copyright (C) 2012 Alexander Reinhold
0009 %
0010 % This program is free software: you can redistribute it and/or modify it
0011 %   under the terms of the GNU General Public License as published by the
0012 %   Free Software Foundation, either version 3 of the License, or (at your
0013 %   option) any later version.
0014 %
0015 % This program is distributed in the hope that it will be useful, but
0016 %   WITHOUT ANY WARRANTY; without even the implied warranty of
0017 %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0018 %   General Public License for more details.
0019 %
0020 % You should have received a copy of the GNU General Public License along
0021 %   with this program.  If not, see <http://www.gnu.org/licenses/>
0022 
0023 % make polar angle in [0, 2pi)
0024 polarAngle = mod(polarAngle, 2*pi);
0025 
0026 % sort data
0027 [polarAngle, permutationVector] = sort(polarAngle, 'ascend');
0028 polarDistance = polarDistance(permutationVector);

Generated on Sat 18-Jul-2015 16:45:31 by m2html © 2005