Value for a certain array is not computed correctly

1 Ansicht (letzte 30 Tage)
Carmela Marie Lingad
Carmela Marie Lingad am 17 Jun. 2021
Beantwortet: Cris LaPierre am 17 Jun. 2021
I have uploaded my matlab code and excel file. I have a question.
With regards to the parameter Elevation in Borehole 1. The value of the 1st elevation (cell F5) should be equal to the value of the elevation in cell I1. Then the next value of elevation in column F should be equal to the difference of the previous elevation subtracted by the difference of 2nd Depth and 1st Depth. So basically, the elevation in cell F6 is equals to 4 - (0.6-0) which is supposedly equal to 3.4, but it returns a value of 3.6. In the code, it is the Elev1 parameter, line 35 to 42. I don't know why it doesn't return the correct value, but for other values of elevation in other borehole, it provides the correct value. Can someone help me? Thank you.

Antworten (1)

Cris LaPierre
Cris LaPierre am 17 Jun. 2021
Either your code is wrong, or you have incorrectly interpreted your algorithm.
From lines 7-8, 1st Depth is column B, 2nd Depth is column C.
Your equation on line 41 says essentially 'next elevation is equal to current elevation minus (next 2nd depth - next 1st depth)
Using the numbers for borehole1, the elevation in F6 is 4 - (1 - 0.6) = 3.6.

Produkte


Version

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by