Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
too many inputs

Subject: too many inputs

From: Renato Costa

Date: 5 Jan, 2009 06:48:02

Message: 1 of 5

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!

Subject: too many inputs

From: NZTideMan

Date: 5 Jan, 2009 07:05:26

Message: 2 of 5

On Jan 5, 7:48=A0pm, "Renato Costa" <nold...@yahoo.com.br> wrote:
> Hi members,
>
> Matlab can't handle a 5 variables function?
> i don't think so... anyone can help me with the below?
>
> ??? Error using =3D=3D> fdeti
> Too many input arguments.
>
> Error in =3D=3D> main at 30
> =A0 =A0 Reg(i+1,t)=3D (fdeti(gamma, mu, h, e, c) )* ( (alpha(i+1)) + (bet=
a(i+1))*h(t-1) + (lambda(i+1))*( mu(t-1)+ (h(t-1))*( e(t-1)^2)) =A0);
>
> where the fdeti.m =A0file is only:
>
> function logistic =3D fdeti(gamma, mu, h, e, c)
>
> logistic =3D (1/(1+exp( -gamma(i+1)*(mu(t-1)+ (h(t-1))*( e(t-1)^2) -c(i+1=
)) )))
>
> what's wrong?
>
> Thanks!

When you type:
which fdeti
what do you get?

Subject: too many inputs

From: Roger Stafford

Date: 5 Jan, 2009 17:59:02

Message: 3 of 5

"Renato Costa" <noldo22@yahoo.com.br> wrote in message <gjsaf2$j0u$1@fred.mathworks.com>...
> 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

Subject: too many inputs

From: Renato Costa

Date: 5 Jan, 2009 23:54:02

Message: 4 of 5

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

Renato
   


"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <gjthp6$jao$1@fred.mathworks.com>...
> "Renato Costa" <noldo22@yahoo.com.br> wrote in message <gjsaf2$j0u$1@fred.mathworks.com>...
> > 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

Subject: too many inputs

From: Renato Costa

Date: 6 Jan, 2009 02:23:02

Message: 5 of 5

Just if another noob read that, it seems that beta is also a function.
So in garch-like model estimations we should do alphas, betas, gammas, lambdas for parameters, for not having problems wit already defined functions: gamma etc...

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us