Skip to main content
11-Garnet
December 22, 2015
Solved

lookup

  • December 22, 2015
  • 1 reply
  • 8368 views

Hi everyone. I am a little bit confuse using lookup command.  I'd like to match the Ixx_match to the nearest given  Ixx and select the equivalent  profile. I attached the exel file so that you can follow the readexel command .

Best answer by LucMeekes

Now, the attached prime file prevents the error by exchanging each z in a lookup function with the boundaries of the input array.

Along the way I made the function a bit more generic.

Sucess.

Luc

Oops. Corrected attachment.

1 reply

23-Emerald IV
December 22, 2015

The Lookup function(s?) don't seem to work with units.

Then there is no easy way to get the 'nearest' matching value without using tolerance (which would get you ALL values within the band) and without programming (I'm limited to prime express).

But I managed to do it:

Basically what the IF statment does is to check the first of the greater-or-equal values list and the last of the less-than-or-equal values for the closest match, and then select the corresponding modifier to select the value from the other array.

Mind, there is no error handling. If z=20 you get an error.

Success!

Luc

ldante11-GarnetAuthor
11-Garnet
December 22, 2015

So you used modifier. I will try this in Mathcad prime 3.1