help-octave
[Top][All Lists]
Advanced

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

Re: indexing


From: mavram
Subject: Re: indexing
Date: Mon, 7 Feb 2005 21:37:14 +0200
User-agent: Mutt/1.5.5.1+cvs20040105i

On Mon, Feb 07, 2005 at 06:08:23AM -0600, Seba T. wrote:
> hi i was wondering about simple funciont like this example one
> 
> for i=101:200
>     minusjeden(i)=minusjeden(i-1)+1/100;
> end;
> 
> it works in matlab but in octave it complains that "i-1" for "i"=101 will 
> give 
> the value 100 which will be outside of the range given by "for" statement. I 
> can use "if" statement to avoid the commands to be executed when i=100 but is 
> there a way i could switch the range checking off ?
> 
> -- 
> Powered by Yoper Linux 
> kernel 2.6.8 ; kde 3.3-1
> 
> www.303.prv.pl
> Jeśli musisz być pod winblowsem używaj www.firefox.pl
> 
Hi,
I tried:
nusjeden=zeros(1,200);
% (I have to define minusjeden somewhow before I use it. I don't
% know how you defined it)
for i=101:200
> minusjeden(i)=minusjeden(i-1)+1/100;
> end

No complaints.
Octave 2.1-57 on Debian testing/unstable.
Cheers, Avraham
> 
> -------------------------------------------------------------
> 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
> -------------------------------------------------------------
> 



-------------------------------------------------------------
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]