Community Tip - You can change your system assigned username to something more personal in your community settings. X
I used the READEXCEL command to create a matrix that I can use Lookup Functions on.
The Lookup Functions work perfectly except I can NOT compare the values as shown below:
Help?
Solved! Go to Solution.
lookup(...) returns a vector of values, not a single scalar.
In your sheet it looks like lookup just finds one value in every case you used it and so the variables you show are 1 x 1 matrices (thats the reason for the square brackets around the numbers). And a matrix - even if its just a 1x1 matrix - can't be compared with a scalar value - therfore the error.
In your case you should use lookup(.....)[0 to just select the first (and obviously only) element. I am assuming you use ORIGIN=0 as per default, other wise change the 0 to whatever you have set ORIGIN to or replace the zero by ORIGIN.
WE
I can tell that your Iy is in matrix format , try to return the matrix to normal.
Or this way
You have matrix with one element as an input value - ]123] - why not 123?
lookup(...) returns a vector of values, not a single scalar.
In your sheet it looks like lookup just finds one value in every case you used it and so the variables you show are 1 x 1 matrices (thats the reason for the square brackets around the numbers). And a matrix - even if its just a 1x1 matrix - can't be compared with a scalar value - therfore the error.
In your case you should use lookup(.....)[0 to just select the first (and obviously only) element. I am assuming you use ORIGIN=0 as per default, other wise change the 0 to whatever you have set ORIGIN to or replace the zero by ORIGIN.
WE
Thanks all!
I followed Werner's advice as my lookup function will ALWAYS return a single value.
Here are my results: