help-octave
[Top][All Lists]
Advanced

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

lookback function? or instlookback?


From: abl5
Subject: lookback function? or instlookback?
Date: Wed, 30 Nov 2005 18:03:53 -0500 (EST)

Hi,

Is there a lookback function for Octave? I found instlookback for matlab
but don't find anything similar in octave. (i should admit that i haven't
finished figuring out exactly what instlookback does yet -- but i'll use
octave over matlab if i can...)

Here is what I want to do:
-Take two specific vectors of data, say I and J
-Start two counters at the first element. One increments by one every row
(until reset) and the other increments by 1 when either
        --there is a non-zero difference between the current non-zero
value of I and the most recent previous non-zero value of I
        or
        --the same is true for J
The other challenge is that both I and J change their non-zero values at
the same time, but because only I or J is non-zero in a given row, I also
have to figure out how to tell the counters to reset & increment for the
first of those two changes but not for the second.

So the way I am imagining this, the two counters depend on some type of
look back or look forward function.

Does that sound like anything familiar, or easily implementable?

Arwen



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