Prev: Enumeration
Next: Radon Transform
From: mat001 on 9 Feb 2010 05:47 Can some one explain me how this function works if ((i == eq.n1) & (j == eq.n1) & (k == eq.n1)) switch varargin{3} % what is means ? case 'x' Aijk = case 'y' Aijk = case 'z' Aijk = otherwise error('unknown case'); end else error(); end return
From: us on 9 Feb 2010 05:54 "mat001 " <priya.biomath(a)gmail.com> wrote in message <hkref6$k8m$1(a)fred.mathworks.com>... > Can some one explain me how this function works > > switch varargin{3} % what is means ? arg=varargin{3}; % returns in ARG the CONTENT of the 3rd CELL of the CELL array VARARGIN... % see also help varargin; us
From: Parker on 9 Feb 2010 05:55 On 2æ9æ¥, ä¸å10æ¶47å, "mat001 " <priya.biom...(a)gmail.com> wrote: > Can some one explain me how this function works > > if ((i == eq.n1) & (j == eq.n1) & (k == eq.n1)) >  switch varargin{3}   % what is means ? >   case 'x' >   Aijk = >   case 'y' >   Aijk = >   case 'z' >   Aijk = >   otherwise >   error('unknown case'); >  end > else >  error(); > end > > return check the third input parameter, if x,y,or z, assign it to Aijk, otherwise raise error
From: mat001 on 9 Feb 2010 06:10 function Aijk = Prob(i, j, k, parameter, varargin) if ((i == eq.n1) & (j == eq.n1) & (k == eq.n1)) switch varargin{3} % what is means ? case 'x' Aijk = case 'y' Aijk = case 'z' Aijk = otherwise error('unknown case'); end else error(); end return Parker little more explain plz.
From: mat001 on 9 Feb 2010 06:12
error occurs ??? SWITCH expression must be a scalar or string constant. |