help-octave
[Top][All Lists]
Advanced

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

Re: something like a modulo function (but not)?


From: Przemek Klosowski
Subject: Re: something like a modulo function (but not)?
Date: Wed, 27 Oct 2004 13:39:12 -0400 (EDT)

Jrigler has the following vector

        idx1 = [ 3   5   8  10  13  15  18  20  23  25 ]

and wishes to convert it to something like:

        idx2 = [ 3   5   3   5    3   5   3    5   3   5 ]

How about      mod(idx1-1,5)+1



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