Assigning A Variable To A Group Of Values

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Assigning A Variable To A Group Of Values

    Is it possible to assign a variable to represent the MAX or MIN value from a group of features: EX. the "Z" values for a group of 4 points. Points:
    "21_a" where the .Z= 0.0005
    "21_b" where the .Z= 0.0016
    "21_c" where the .Z= -0.0023
    "21_d" where the .Z= 0.0020

    If you could please show me the SYNTAX I would greatly appreciate it.
    sigpic
    Cold Beer MMMmmmm........

    Dell Precision T5400
    Windows 7
    B&S XCEL
    WENZEL LH1512
    PCDMIS 2011 MR1

  • #2
    Yes, get the index number of the max then replace that index with whatever it is you want to replace it with. You are using an array right?

    Craig

    For example:

    Code:
                ASSIGN/AR_YOUR_ARRAY = ARRAY(0.0005, 0.0016, -0.0023, 0.0020)
                ASSIGN/AR_MAXINDX = MAXINDEX(AR_YOUR_ARRAY)
                ASSIGN/AR_YOUR_ARRAY[AR_MAXINDX] = PUT THE VALUE YOU WANT TO REASSIGN IT TO HERE
    Never mind I read your post wrong the above replaces the max value. I don't know what I was thinking.
    Last edited by craiger_ny; 09-12-2006, 03:59 PM.
    <internet bumper sticker goes here>

    Comment


    • #3
      Originally posted by rerun_lives
      Is it possible to assign a variable to represent the MAX or MIN value from a group of features: EX. the "Z" values for a group of 4 points. Points:
      "21_a" where the .Z= 0.0005
      "21_b" where the .Z= 0.0016
      "21_c" where the .Z= -0.0023
      "21_d" where the .Z= 0.0020

      If you could please show me the SYNTAX I would greatly appreciate it.
      ASSIGN/V1 = 21_A.Z
      ASSIGN/V2 = 21_B.Z
      ASSIGN/V3 = 21_C.Z
      ASSIGN/V4 = 21D.Z
      ASSIGN/V4 = ARRAY (V1,V2,V3,V4)
      ASSIGN/ V5 = MAX (V4)
      ASSIGN/V6 = MIN (V4)
      Then create generic points out of your min/max assignments
      Think thats what your asking
      sigpic.....Its called golf because all the other 4 letter words were taken

      Comment

      Related Topics

      Collapse

      Working...
      X
      😀
      🥰
      🤢
      😎
      😡
      👍
      👎