[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems loading a program in octave
From: |
Joe Koski |
Subject: |
Re: Problems loading a program in octave |
Date: |
Thu, 15 Jun 2006 16:56:44 -0600 |
User-agent: |
Microsoft-Entourage/11.2.3.060209 |
on 6/15/06 4:21 PM, John W. Eaton at address@hidden wrote:
> On 15-Jun-2006, Joe Koski wrote:
>
> | on 6/15/06 3:51 PM, Hayden Rampadarath at address@hidden wrote:
> |
> | > Hi,
> | >
> | >
> | >
> | > I am having problems loading a program.
> | >
> | > Everytime I enter 'load C:\plates\read_hayden.m'
> | >
> | > I get
> | >
> | > 'error: load: C:\plates\read_hayden.m: inconsistent number of columns near
> | > line 2'
> | >
> | > 'error: load: unable to extract matrix size from file
> | > 'C:\plates\read_hayden.m'
> | >
> | >
> | >
> | > any ideas why???
> | >
> | >
> | Hayden,
> |
> | I had the same problem this morning on my Mac. It usually indicates that
> | there is something wrong with the data file format. With an editor, check to
> | make sure that you have the correct (DOS or UNIX) line endings. This
> | morning, I had to delete some hidden characters at the end of the file, and
> | then resave my data with a new blank line at the end.
>
> But the script Hayden posted was not a data file. It was a script
> file. So instead of loading it, you just need to make sure it is in a
> directory in the LOADPATH (like the same directory where you are
> running Octave; type pwd at the Octave prompt if you are not sure
> where you are) and type the name of the file (without the .m):
>
> octave:1> read_hayden
>
> jwe
John, Hayden,
Yes, but octave is complaining about the number of columns and matrix size,
which is characteristic of reading a data file format. When I have
line-ending format problems or missing .m files, I usually get an error on
line 1, but the error is different. If it is a data file, it doesn't need
the .m to be read.
Joe
Joe