From: "Renato Costa" <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: too many inputs
Date: Mon, 5 Jan 2009 23:54:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 40
Message-ID: <gju6iq$1q5$>
References: <gjsaf2$j0u$> <gjthp6$jao$>
Reply-To: "Renato Costa" <>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1231199642 1861 (5 Jan 2009 23:54:02 GMT)
NNTP-Posting-Date: Mon, 5 Jan 2009 23:54:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1655033
Xref: comp.soft-sys.matlab:509934

Hi Roger,

  Thank you for the message.
  gamma is a vector of parameters to me. googling i saw that the same word is used as u alerted me to the gamma function. I should change that name.
  t and i are used for instance as "for i=2:5".
  I didn't know that "  i "  couldn't be used like a coordinate of a vector. I should change for k for instance. Thank you for the warnings.

Best Regards


"Roger Stafford" <> wrote in message <gjthp6$jao$>...
> "Renato Costa" <> wrote in message <gjsaf2$j0u$>...
> > Hi members,
> > 
> > Matlab can't handle a 5 variables function?
> > i don't think so... anyone can help me with the below?
> > 
> > ??? Error using ==> fdeti
> > Too many input arguments.
> > 
> > Error in ==> main at 30
> >     Reg(i+1,t)= (fdeti(gamma, mu, h, e, c) )* ( (alpha(i+1)) + (beta(i+1))*h(t-1) + (lambda(i+1))*( mu(t-1)+ (h(t-1))*( e(t-1)^2))  );
> > 
> > where the fdeti.m  file is only:
> > 
> > function logistic = fdeti(gamma, mu, h, e, c)
> > 
> > logistic = (1/(1+exp( -gamma(i+1)*(mu(t-1)+ (h(t-1))*( e(t-1)^2) -c(i+1)) )))
> > 
> > what's wrong?
> > 
> > Thanks!
>   The way your 'fdeti' function is written could lead to trouble.  Do you intend for the 'gamma' which is named there to be an input vector or is it meant to be the built-in gamma function?  Either way there will some kind of conflict.  If 'gamma' is the name of a vector, then "gamma(i+1)" doesn't make sense with a complex index, since 'i' would be interpreted as the imaginary square root of -1.  The same difficult would apply to "c(i+1)".  If 'gamma' is to be the famous gamma function, then it should not be named as a generalized input argument.  In any case you should not be using the name 'gamma' as a variable.  Also I see no definition for the 't' variable within 'fdeti'.
> Roger Stafford