help-octave
[Top][All Lists]
Advanced

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

Re: Efficient definition of multidimensional ranges


From: stn
Subject: Re: Efficient definition of multidimensional ranges
Date: Thu, 7 Jun 2012 12:23:11 +0200



2012/5/31 Doug Stewart <address@hidden>

Is your input really  an English statement ?

Is the English part always the same and can be ignored or does the parser have to look at these words and decide what to do?


@Doug

Hi Doug,

sorry, my bad for not making it clear.

The english statement was not meant to be input into octave. It was meant to describe to the list (in english) what the question is about.

The question I have is this: what would be an efficient octave-syntax to express the english statement "give me 2 groups length 3, 1 group length 6, 1 group length 2, counting from 1 to last, (whatever last may be)".

The point is that this definition would change all the time. So group 3 (length=6) would in the next run be length=7, implying that groups 4:end would have to shifted by one item. Or a third group with length 3 may be added at the beginning. The definition would then change to to "give me 3 groups length 3 ..."

In each case the automatic implication is to count from 1 to last number necessary so there is no need to explicitely state the increment in the definition. Like [ 1:10 ] implies "increment=1"



@Sergej

Hi Sergej, your suggestion would work and is similar to the solution I gave in the first post.

The problems would begin once you try to change the definition. For example if you want to change the length of the second group (4:6 in your example to 4:7) then you have to manually change every group that follows.

So if testing different group-lengths and -combinations is what the whole thing is about then you become really busy changing group-definitions. Do that 20 times a day (or 200 times in my case) and you never get around to the actual calculations. And don't even think about how many errors you would make on the way, like leave out numbers or assign numbers to two different groups.

Regards
Stefan






 
  


--
DAS

https://linuxcounter.net/user/206392.html


reply via email to

[Prev in Thread] Current Thread [Next in Thread]