to -1 and return -1)
-4th iteration
for Z = 14
return -1 (because 0<Z<15 A is returned and has been set to -1 at the previous iteration)
-5th iteration
for Z=13
return -1
-and so on till
Z=0
return 1 (and set A to 1)
-next iteration
Z=1
return 1
-and so on till we reach 15 and go back the other way
Thanks a lot
…
another example could be:
index 3 value 6
index 4 value 6
index 5 value 6
flipped and branched:
branch 6 index 0 value 3
branch 6 index 1 value 4
branch 6 index 2 value 5
Added by Ante Ljubas at 12:50pm on October 22, 2010
=1), {1,1}(N=1)...{1,15}(N=1). While Y is made of {0}(N=6), {1}(N=15).
What I need to do, is to cycle through all the branched items of the X lists with every single item of the corresponding list of Y.
So:
{0,0}(N=1) with 1st item of Y{0},
{0,1}(N=1) with 1st item of Y{0}
...
{0,15}(N=1) with 1st item of Y{0} (and this is the first cycle).
Then (cycle 2)
{0,0}(N=1) with 2nd item of Y{0},
{0,1}(N=1) with 2nd item of Y{0}
...
{0,15}(N=1) with 2nd item of Y{0}
Then do the same thing with the X list {1,0} .. {1,15} with the corresponding Y{1}
As a result I need the following list structure:
{0,0}N=6, {0,1}N=6, {0,2}N=6 ... {0,15}N=6,
{1,0}N=15, {1,1}N=15, {1,2}N=15 ... {0,15}N=15.
If I use the component you suggested "shift path" it will match the items per item-order instead of cycling through all the items of the first sublist...
Hope this makes sense.
Any suggestion?…
I have this :
list 3 : 0 1 2 3 4 5 6
list 2 : 0 1 2 3 4 5 6
list 1 : 0 1 2 3 4 5 6
list 0 : 0 1 2 3 4 5 6
and I want to group the points of index 0 in a branch, the points of index 1 in another branch and so on.
I attached a file in which I generated the points.
Thank you in advance for your help !
Regards
Red…
dont get you, i am saying sleect numbers in range 1 to 10, starting from 1 with a step of 2.
1 to 10 by 3 = 1 4 7 10
1 to 10 by 5 = 1 6
1 to 10 by 1 = 1 to 10 = 1 2 3 4 5 6 7 8 9 10
Added by Steve Lewis at 3:15pm on November 11, 2013
ents will do or which components will be available.
My problem arises because I want to obtain a list such as the following:
{{6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6}, {5, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5}, {4, 5, 6, 5, 4, 3, 2, 1, 2, 3, 4}, {3, 4, 5, 6, 5, 4, 3, 2, 1, 2, 3}, {2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 2}, {1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1}}
Which displayed as a matrix is:
If it were possible to combine GH operations (series, shift list, replace string...) with matrices I think it would be quite powerful. A matrix to list component like those available on scientific calculators, would then translate the matrix to list.
For me, matrices come in handy when dealing with surface patterns.
…
Added by Jesus Galvez at 6:46am on November 26, 2012