Hi there ,
I need to create this table using programing
I wrote this program , but it doesn't give me the answer I want:
What I wrote in the program is
if the bottom value is between z and d .....> the layer is drained and use the angle (alfa)
if the bottom is greater than d and smaller than z ....> the layer is partially drained and use the angle (alfa)
otherwise write the layer is not drained
I need the answer two have 3 columns
1# ( layer ( drained-partially- not drained)
2# the angle if it is drained or partially drained .. if not drained show zero
3# if it is possible this column as well which is the layer kind it is in the table in the sheet as input
Thanks
Yusra
The sheet is attached prime 10
Solved! Go to Solution.
This is what it would look like using a second vector for the angle and returning the augmented result
You could also do without the vector 'angle" as is it is the very same as the vector phi in your input table!
But it looks to me that you use a faulty logic as you never can arrive at the "not drained" branch.
You have four different branches in your program but there only are three different locations for 'bottom'!
It can be
1) larger than z (above -0.62,)
2) between d and z (between -2.4 m and -0.62 m)
or
3) lower than d (below -2,4 m).
I don't know which of the three sections you would call "drained", "partially drained" or "not drained".
But you sure don't need four branches in your program to distinct between the three different locations.
The logic in your program is that a value between d and z is called "drained" and everything else is called "partially drained".
I guess that's not as it should be,
Prime 10 sheet attached
This is what it would look like using a second vector for the angle and returning the augmented result
You could also do without the vector 'angle" as is it is the very same as the vector phi in your input table!
But it looks to me that you use a faulty logic as you never can arrive at the "not drained" branch.
You have four different branches in your program but there only are three different locations for 'bottom'!
It can be
1) larger than z (above -0.62,)
2) between d and z (between -2.4 m and -0.62 m)
or
3) lower than d (below -2,4 m).
I don't know which of the three sections you would call "drained", "partially drained" or "not drained".
But you sure don't need four branches in your program to distinct between the three different locations.
The logic in your program is that a value between d and z is called "drained" and everything else is called "partially drained".
I guess that's not as it should be,
Prime 10 sheet attached
Hi Werner,
Yes I wrote the conditions wrong . They should be as you suggested.
Thank you
As the angle and the type are just taken from the input table, you may also use something like this:
I used "lower"; "between" and "higher" because I am still unsure which depth should be named "drained", etc. 😉
Instead of using the if-function as shown above you could also use the programmed if-condition. It looks clearer, I think, at the cost of taking up much more vertical space. I also added a row to the input data so that all three possible cases can be checked.
That's even better. Can I show the angles in degree like in the table not in radian
@YA_10963798 wrote:
That's even better. Can I show the angles in degree like in the table not in radian
You can show the value in degree, but not the degree sign °.
If necessary you could add column headers
BTW, using the angle from the input table only makes sense, if this angle is independent from the classification in "drained"/"not drained".
If the angle depends on that classification it should not be typed in in the table but rather be calculated depending on the depth of "Bottom". Maybe like this: