function y = cur(x, varargin) % CUR function equivalent of curly braces % % For a discussion on the thoughts behind this function, see par. % 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 % $Id$ y = x{varargin{:}}; end