X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 15 Mar 2006 09:26 AM by  anon
Extracting coordinates of max in multi-dimensional arrays
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
15 Mar 2006 09:26 AM
    I'm currently working on finding the maximum correlation between distorted images, and I have an array of all the values of the cross correlations between the distorted and a comparison image. I'm trying to find the coordinates of the maximum, not really the maximum itself. At the moment I have a three-dimensional array (that will be a five-dimensional) that has size (9,9,109) and the Max is returning the number 85, but I'm not certain how to extract the coefficients. While I can keep track of the max as I go, when I'm testing it's nice to be able to see all of the correlations and compute it all in one. If this isn't possible, or MAX() isn't the way to go, or even how to do it, I'd appreciate the tip!

    Deleted User



    New Member


    Posts:
    New Member


    --
    15 Mar 2006 09:26 AM
    IDL has a built-in function named ARRAY_INDICES, which performs the 1D to [original_n]D conversion of your MAX's scalar 'subscript' output. The syntax, using your own example, would be: IDL> myMax3Dsubscript = ARRAY_INDICES([9,9,109], 85, /DIMENSIONS) IDL> help, myMax3Dsubscript MYMAX3DSUBSCRIPT INT = Array[3] IDL> print, myMax3Dsubscript 4 0 1 James Jones
    You are not authorized to post a reply.