|
From: Carlos Adrian Vargas Aguilera on 18 Jun 2008 18:57 "Bruno Luong" <b.luong(a)fogale.fr> wrote in message <fuauva$726$1(a)fred.mathworks.com>... > "ra ti" <monarc_74_NOSPAM(a)yahoo.com> wrote in message > <fuau1b$ac5$1(a)fred.mathworks.com>... > > > > > function out = myfunc(x,varargin) > > > > now, to do ndgrid(2,1:4,3), I can do: > > > > [s1,s2,s3]=ndgrid(varargin{1},varargin{2},varargin{3}) and > > then use sub2ind. > > > > Use cell instead of variables. > > c=cell(size(varargin)); > [c{:}] = ... > > Bruno Thank you bruno, just what I was looking for. I almost decided to use eval!
|
Pages: 1 Prev: mex unresolved external symbol error Next: spirals and knots |