Home > freetb4matlab > fixed > fsort.m

fsort

PURPOSE ^

% Return a copy of the fixed point variable @var{x} with the elements

SYNOPSIS ^

function [s, i] = fsort (x)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {[@var{s}, @var{i}] =} fsort (@var{x})
% Return a copy of the fixed point variable @var{x} with the elements
% arranged in increasing order.  For matrices, @code{fsort} orders the 
% elements in each column.
%
% For example,
%
% @example
% @group
% fsort (fixed(4,0,[1, 2; 2, 3; 3, 1]))
%     @result{}  1  1
%         2  2
%         3  3
% @end group
% @end example
%
% The @code{fsort} function may also be used to produce a matrix
% containing the original row indices of the elements in the sorted
% matrix.  For example,
%
% @example
% @group
% [s, i] = sort ([1, 2; 2, 3; 3, 1])
%      @result{} s = 1  1
%             2  2
%             3  3
%      @result{} i = 1  3
%             2  1
%             3  2
% @end group
% @end example
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Sat 16-May-2009 00:04:49 by m2html © 2003