Can you help me find the mistake in my Matlab code?

1 view (last 30 days)
I use Matlab to find the optimal number of wells, however when I run the file of Optimization.m, it seems not work. I don't know where it is wrong. I have checked my functions, they are correctly, but when I set direct number to NPV.m, it run too slow. So, can you help me find my mistake in Optimization.m as the attached file and how to improve speed of process
Tien Tran
Tien Tran on 10 Jan 2016
Thank you very much. You have found my mistake, RFpl in VariableSet.xlsx lies in interval (30% -> 70%), so data in Excel file is wrong and the result is incorrect. Best regards.

Sign in to comment.

Accepted Answer

Geoff Hayes
Geoff Hayes on 10 Jan 2016
Requested that Tien verify that the data being read from each column was correct with respect to units and variable descriptions. Pointer out that the RFpl (recovery factor at end of plateau) has values between 30 and 70 (from the VariableSet.xlsx file), but that the example from Tfigure43.m assigned 0.5 to this same variable.
Tien verified that the data in the column was incorrect (percentages rather than the decimal equivalent).

More Answers (0)


Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by