Home > atmlab > handy > cur.m

cur

PURPOSE ^

CUR function equivalent of curly braces

SYNOPSIS ^

function y = cur(x, varargin)

DESCRIPTION ^

 CUR function equivalent of curly braces

 For a discussion on the thoughts behind this function, see <a
 href="matlab:help par">par</a>.
 CUR is the equivalent but with curly braces.

 FORMAT

   y = c(func(), a, b, ...)

 IN

   func()      expression to be indexed or called
   a, b, ...   index per dimension

 OUT

   y           result of indexing operation x{a, b, ...}

 By Gerrit Holl, inspired by http://is.gd/b3MkRf

 See also: par, getfield

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

cur.m

SOURCE CODE ^

0001 function y = cur(x, varargin)
0002 % CUR function equivalent of curly braces
0003 %
0004 % For a discussion on the thoughts behind this function, see <a
0005 % href="matlab:help par">par</a>.
0006 % CUR is the equivalent but with curly braces.
0007 %
0008 % FORMAT
0009 %
0010 %   y = c(func(), a, b, ...)
0011 %
0012 % IN
0013 %
0014 %   func()      expression to be indexed or called
0015 %   a, b, ...   index per dimension
0016 %
0017 % OUT
0018 %
0019 %   y           result of indexing operation x{a, b, ...}
0020 %
0021 % By Gerrit Holl, inspired by http://is.gd/b3MkRf
0022 %
0023 % See also: par, getfield
0024 
0025 % $Id: cur.m 8777 2014-02-12 12:45:13Z gerrit $
0026 y = x{varargin{:}};
0027 end

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005