[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
"end" as array index?
From: |
James Frye |
Subject: |
"end" as array index? |
Date: |
Fri, 20 Dec 2002 13:44:46 -0800 (PST) |
Hi,
Got what is probably a real dumb newbie question: our lab has a bunch of
data analysis scripts written for Matlab. I'm trying to get some of them
to work under Octave, even though I know next to nothing about Matlab. The
scripts have a mumber of instances of a construct like
temp (end-3:end) = 0;
which works in Matlab, but causes Octave to give the message "error:
evaluating index expression near...", with the caret pointing to the last
character in the first "end".
Is there an alternative syntax that would do the same thing, rather than
adding code to compute the length and store it in a variable?
Thanks,
James
-------------------------------------------------------------
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
-------------------------------------------------------------
- Hi, another newbie ..., Andrzej M. Ostruszka, 2002/12/19
- Re: Hi, another newbie ..., Paul Kienzle, 2002/12/19
- Re: Hi, another newbie ..., John W. Eaton, 2002/12/20
- "end" as array index?,
James Frye <=
- "end" as array index?, John W. Eaton, 2002/12/20
- Re: "end" as array index?, Laurent Jacques, 2002/12/22
- Re: "end" as array index?, John W. Eaton, 2002/12/21
- Re: "end" as array index?, Laurent Jacques, 2002/12/23