cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Using Lookup function

YA_10963798
9-Granite

Using Lookup function

I need to use lookup function to specify the sand layer . I want to say if the value of qcza is between 5 and 25 MPa then the sand layer is in the depth that gives this range , I tried to do it , but I guess it's wrong

 

YA_10963798_0-1712652647781.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:YA_10963798)

Surely not. the lookup function requires an array as its second and third arguments, you are feeding it scalar numbers. That does not work.

Given your data matrix CPT, that (as it appears) contains depths in its first column, and (associated?) pressures in its second column, what do you want the function layers to give you? Or is it just:

LucMeekes_0-1712698295652.png

LucMeekes_1-1712698304450.png

(Note that your Layer_Classification function does not address the q sca values between 2 and 5 MPa, and gravel and Peat share the same pressure range, so gravel will never be found.

 

Success!
Luc

 

View solution in original post

5 REPLIES 5
LucMeekes
23-Emerald III
(To:YA_10963798)

You should look up the information on the lookup function in the help:

lookup(z, A, B, [modifier | f])—Looks in a vector or matrix A for a given value z, subject to the conditions of the optional modifier, and returns the value(s) in the same position(s) (that is, with the same row and column numbers) in matrix B. When the value(s) are returned, they appear in a vector in column-wise order, starting with the top left corner of B and sweeping down.

 

With that information: is your q cza m

an array?

 

Success!
Luc

qcza is in MPa and z is in m , 

Do you suggest any other function can do what I want: 

I want to say if the value of qcza is between 5 and 25 MPa then the sand layer is in the depth that gives this range , 

This also didn't work 

YA_10963798_0-1712689947773.png

 

LucMeekes
23-Emerald III
(To:YA_10963798)

Surely not. the lookup function requires an array as its second and third arguments, you are feeding it scalar numbers. That does not work.

Given your data matrix CPT, that (as it appears) contains depths in its first column, and (associated?) pressures in its second column, what do you want the function layers to give you? Or is it just:

LucMeekes_0-1712698295652.png

LucMeekes_1-1712698304450.png

(Note that your Layer_Classification function does not address the q sca values between 2 and 5 MPa, and gravel and Peat share the same pressure range, so gravel will never be found.

 

Success!
Luc

 

can you attach the sheet,please?

 

Top Tags