Skip to main content
12-Amethyst
August 15, 2022
Solved

Error on table look-up

  • August 15, 2022
  • 1 reply
  • 1074 views

Hi guys i am having a error when trying to find a Phi value between two types;

 

essentially if Srtype is "cohesive" for that layer of ground then Phi should be = to 0 deg. Else read from the value from the table for the following increments and so on......

 

sheet is attached, 

 

thank you and help would be appreciated 

BG_9641770_0-1660580969782.png

 

Best answer by Werner_E

The highest value in L.v2 is 8.5 m

idx runs from 0 to 34 and  for idx from 21 up the corresponding value in z.b is greater than 8.5 and so no matching (greater or equal) value in L.v2 can be found and this is exactly the error message you get.

Werner_E_0-1660594830016.png

 

Furthemore ... Sr.type is vector with four string elements. This whole vector never can be equal to the the single string "cohesive". So the comparison

if Sr.type="cohesive"

will always fail and the else branch is executed.

 

1 reply

Werner_E25-Diamond IAnswer
25-Diamond I
August 15, 2022

The highest value in L.v2 is 8.5 m

idx runs from 0 to 34 and  for idx from 21 up the corresponding value in z.b is greater than 8.5 and so no matching (greater or equal) value in L.v2 can be found and this is exactly the error message you get.

Werner_E_0-1660594830016.png

 

Furthemore ... Sr.type is vector with four string elements. This whole vector never can be equal to the the single string "cohesive". So the comparison

if Sr.type="cohesive"

will always fail and the else branch is executed.

 

12-Amethyst
August 16, 2022

Understand, thanks Werner_E