09-01-2009 07:13 PM - edited 09-01-2009 07:18 PM
hi guys,
this is probs an easy one for you but how can you find the diffence between all elements in an array?
e.g array = 1 2 3 4 5 6
so difference between 1 and two is 1, difference between 1 and 3 is 2. all the way to trough to the differece between 6 and x is x etc.
i have been trying to use shift registers but cant quite get it.
Thanks
Solved! Go to Solution.
09-01-2009 07:49 PM
Try a Rotate 1-D array. (It's in the array functions). I think it will do just what you want. If it doesn't, let me know.
09-01-2009 07:54 PM
09-01-2009 07:57 PM - edited 09-01-2009 08:00 PM
09-01-2009 07:59 PM
You need to clarify your question.
Do you simply want to subtract indexes of same array or indexes of different array.
I suppose you mean you have an array, and you want to be able to subtract one element from another element of the same array?
If that is the case, you can simply have two controls, and connect them to the index array function.
09-01-2009 08:19 PM - edited 09-01-2009 08:27 PM
Thanks for the fast replys guys.
to try and clarify what I am wanting to do: I want to subtract one element from all others then move to the next element then subtract all others, all the way though to the end. This is all within the same array.
Harold's idea was close but only works for the first element.
09-01-2009 08:44 PM
09-01-2009 08:50 PM
09-01-2009 08:52 PM - edited 09-01-2009 08:53 PM
No need for the outer loop.
09-01-2009 08:58 PM