Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
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
Solved! Go to Solution.
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.
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.
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.
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.
Understand, thanks Werner_E