Actually, there is an easy way to do this vectorially. You can use Select (I think this is the right op... I'm not in front of DX right now) to pick all _except_ element 0 of an array, and then another select to take everything up through element n-1 (where n-1 comes from an Inquire, using the (whatever)-1 option as the inquiry to automatically subtract 1 without an extra Compute), and then just compute a-b. This gives an array of (n-1) differences to go with the original n elements.

Marcus Mendenhall




I have 3D data that I have extracted just the z positions:

   data -> Slice -> Slice -> Extract

So now I have an array containing just the z positions (the z positions
are the same given any x and y).

How do I access the individual elements of the array?

What I want to create is another array which contains the deltas between
the z positions. Something like:

       for (i=0; i<n-1; i++)
          deltas[i] = array[i+1] - array[i]


I can't figure out how to do this in DX.

Can someone help?

Thanks,

Betsy

Reply via email to