Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
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
Solved! Go to Solution.
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:
(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
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
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:
(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?