[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems loading a program in octave
From: |
Hayden Rampadarath |
Subject: |
Re: Problems loading a program in octave |
Date: |
Fri, 16 Jun 2006 00:38:04 +0100 (BST) |
Hi,
I did what jon suggested and it worked.
Thanx
but... I got the following msgs.
error: plot: no data to plot
"(some how it cannot read the data)"
error: evaluating if command near line 56, column 2
error: evaluating if command near line 55, column 7
error: evaluating while command near line 44, column 5
error: evaluating if command near line 30, column 3
"(there is no if and while commands there)"
error: called from'_plt_' in file '/usr/share/octave/2.1.71/m/plot/_plt_.m'
error: called from'plot' in file '/usr/share/octave/2.1.71/m/plot/plot.m'
error: near line 135 of file '/cygdrive/c/plates/read_hayde.m'
line 135
has 'plot (date, mag_OJ - mag_f1, "04")'
Also if you have an input txt file like
1.23 233
1.34 949
1.45 345
.
.
.
how can I read the data??
Thanks,
Hayden
"John W. Eaton" <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
Send instant messages to your online friends http://uk.messenger.yahoo.com