help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: indexing


From: John W. Eaton
Subject: Re: indexing
Date: Fri, 6 Mar 2009 13:57:59 -0500

On  6-Mar-2009, asha g wrote:

| The error message is related to the for loop.
| for iter =1:niter ( line -80)
| 
| end (line -150)
| 
| error: can't perform indexing operations for <unknown type> type
| error: evaluating for command near line 80, column 1
| error: near line 150 of file `/home/proj/08/cesasha/cabunbact2octester/cabunba
| 
| Sorry for not making this clear. 

You still haven't made it clear.  It would be good if you provided
some context, not just two isolated lines that don't even include an
indexing operation.

Can you debug problems without seeing the code that fails?  Do you
think we can?

Anyway, this kind of error typically happens when you try to call a
script as if it were a function.

The current development version of Octave produces better error
messages.  For example:

  octave:1> fooscript ()
  error: invalid use of script in index expression
  octave:1> fooscript {}
  error: invalid use of script in index expression
  octave:1> fooscript.m 
  error: invalid call to script
  octave:1> 


jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]