Error 2 - Invalid Factor

Error 2 - Invalid Factor

Post by ace.sigm » Thu, 18 Sep 2008 02:10:24


Hi all, I'm new at Scilab, just started using version 4.1 on Mac OSX.
I am trying to input a fairly complex equation and I inexplicably get
an "error 2 - invalid factor" when I try to evaluate my equations.
Sometimes I get it and sometimes I don't.

What exactly is the root cause of this error? Sometimes my equation
won't work, then I will retype it exactly and it works. I don't
understand, and can't find any useful documentation from my searching
so far. Any help would be appreciated.

I can try to post an example if that will help, but sometimes it will
be as simple as f=tan(2) - and get this error. I retype it and then it
works.
 
 
 

Error 2 - Invalid Factor

Post by Enrico Seg » Thu, 18 Sep 2008 16:30:35

the error usually arises because of a "syntax error", at a point where
the scilab parser could at best expect a numeric factor within an
expression. For instance

-->f=tan(2) -
!--error 2
invalid factor

-->f=tan(2)&
!--error 2
invalid factor

-->f=)
!--error 2
invalid factor

Apparently, if it works the time you retype, it is because you typed
it wrong in the first place. If you're absolutely sure that is not the
case, that might a bug worth investigating.