Home > freetb4matlab > control > sortcom.m

sortcom

PURPOSE ^

% Sort a complex vector.

SYNOPSIS ^

function [yy, idx] = sortcom (xx, opt)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {[@var{yy}, @var{idx}] =} sortcom (@var{xx}[, @var{opt}])
% Sort a complex vector.
%
% @strong{Inputs}
% @table @var
% @item xx
% Complex vector
% @item opt
% sorting option:
% @table @code
% @item 're'
% Real part (default);
% @item 'mag'
% By magnitude;
% @item 'im'
% By imaginary part.
% @end table
% if @var{opt} is not chosen as @code{'im'}, then complex conjugate pairs are grouped together,
% @math{a - jb} followed by @math{a + jb}.
% @end table
%
% @strong{Outputs}
% @table @var
% @item yy
% Sorted values
% @item idx
% Permutation vector: @code{yy = xx(idx)}
% @end table
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003