help-octave
[Top][All Lists]
Advanced

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

Re: Load data with script


From: Steffen Titze
Subject: Re: Load data with script
Date: Wed, 16 Sep 2009 19:20:23 +0200
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)


So the file is named script.m and you are typing script.m at the
Octave prompt?  Try typing script (without the .m extension).

If that is the problem, then did you never see

  error: can't perform indexing operations for <unknown type> type

when doing this with Octave 3.0.x?

This used to happen because an expression like

  s.e

is an expression to access the structure element E from the structure
S.  When you type

  script.m

Octave evaluated "script" by calling the script then attempting to
index the result with ".m".  So the script was being evaluated, but
since scripts don't return values, the indexing operation failed.

Now, Octave recognizes in advance that "script" is a script, and since
it can't produce a value for indexing, it gives you the error
immediately instead of after evaluating the script.

jwe

Thanks it works, when i call the script without the .m extension.
i think i had never see this error message by Octave 3.0.x,

Tomorrow i will test it on another system, where is Octave 3.0.3 still intalled.

Steffen


reply via email to

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