Page 1 of 1

Posted: 07 Feb 2010, 06:18
by soundmind
I know that there is an array expand/compress module but it is only for array length. is there a way to do the same with the values of the elements within the array? i am trying to use one array to edit the values in multiple arrays all with different min/max values but i want the resulting arrays to maintain the shape of the first one.. thanks.

Posted: 07 Feb 2010, 09:57
by martignasse
you have at least two way to achieve this :

with a mapper curve :
-You set min in, max in, min ou and max out, with a linear mapping.

with a A*in+B module (affine transformation) :
-Set A to (max out - min out)
-Set in with the array data
-Set B to min out

hope it help

Posted: 08 Feb 2010, 02:29
by Clearscreen
it's worth remembering all the math modules work on arrays... comes in very very handy at times :)

Posted: 09 Feb 2010, 02:14
by soundmind
Thanks for the info martin. i did not know it was that easy.
Clearscreen wrote:it's worth remembering all the math modules work on arrays... comes in very very handy at times :)
definitely good to know this.

thanks for all the help.