help-octave
[Top][All Lists]
Advanced

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

Re: Scripting error message


From: David Bateman
Subject: Re: Scripting error message
Date: Fri, 26 Nov 2004 10:14:11 +0100
User-agent: Mutt/1.4.1i

According to NZG <address@hidden> (on 11/26/04):
> Every time I run a script it in Octave I get the message:
> 
> source(Problem72.m)
> error: can't perform indexing operations for <unknown type> type
> error: evaluating argument list element number 1
> 
> My script looks like this
> #Problem 7.2
> 1;
> 
> A = [1 1;1 1];
> B = [0;1];
> C = [1 0];
> 
> m = 1;
> alpha = 10;
> beta = 10;
> 
> It works just fine, but always generates the error message.
> Is my syntax wrong?
> What am I forgetting?

I don't think your code worked at all.... The problem is that octave 
thinks that Problem72.m is the element "m" of the structure "Problem72".
As the variable Problem72 doesn't exist, octave doesn't know its type.
A clearer error message is probably in order here though.

You forgot the quotes to tell octave that it is in fact a string.. Try
source("Problem72.m") and it'll work properly this time. Or alternatively
you can do 

octave:1> mark_as_command source

and then do

octave:2> source Problem72.m

Regards
David

-- 
David Bateman                                address@hidden
Motorola CRM                                 +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 1 69 35 77 01 (Fax) 
91193 Gif-Sur-Yvette FRANCE

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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