Value for a certain array is not computed correctly

1 回表示 (過去 30 日間)
Carmela Marie Lingad
Carmela Marie Lingad 2021 年 6 月 17 日
回答済み: Cris LaPierre 2021 年 6 月 17 日
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.

回答 (1 件)

Cris LaPierre
Cris LaPierre 2021 年 6 月 17 日
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.

カテゴリ

Help Center および File ExchangeVisual Exploration についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by