help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nonlin_min function


From: Steph Bredenhann
Subject: Re: nonlin_min function
Date: Mon, 6 Apr 2020 12:07:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 2020/04/06 10:54, Kai Torben Ohlhus wrote:
On 4/6/20 2:49 PM, Steph Bredenhann wrote:
[...]

The variables are as follows, and please note that the values after %
for GPL_Do, etc are the values as calculated with Excel SOLVE function:

[...]
Dear Steph,

I attached all necessary codes as m-files.

Maybe there is a typo in your function "fn_BBR_GPL_RMSE()"?  In short:

   Dcalc = D = D0 + D1*t.^m;
   SRE = (D-Dcalc)./D;

In this case "SRE" is always zero, as "Dcalc = D" and no progress seems
to happen.  Furthermore "D" seems to be an input parameter of
"fn_BBR_GPL_RMSE()", which is unused then.

HTH,
Kai
Dear Kai

Thank you very much for taking time to look at my problem, it is appreciated.

There is a typo in my code, it is embarising! I actualy have another function to calculate the GPL D0 + D1*t^m but didn't want to confuse the issue so I replaced the function call with the one line code and then made the typo, my apologies. Removing the typo does not solve my problem, the line should be

Dcalc = D0 + D1*t.^m;

I have added a print statement to print the output of the function fn_BBR_GPL_RMSE:

fn_GPL: RMSE = 1.76664
fn_GPL: RMSE = 1.76566
fn_GPL: RMSE = 1.76762
fn_GPL: RMSE = 1.76433
fn_GPL: RMSE = 1.76895
fn_GPL: RMSE = 1.75902
fn_GPL: RMSE = 1.77424
fn_GPL: RMSE =     Inf
fn_GPL: RMSE = 64468270468788378205787493575484047335386768972351487380052923633120701124491032255846390698082304.00000
fn_GPL: RMSE = 128499488.88036
fn_GPL: RMSE = 61955.28569
fn_GPL: RMSE = 602.30488

the search should be for the min of RMSE, it oscillates (because I start very close to the min as determined by Excel) and then suddenly gets out of control.

Yet, on return nonlin_min still report a successful completion, with one iteration?

VE_BBR: GPL_cvg = 3.00000

>> GPL_outp
GPL_outp =

  scalar structure containing the fields:

    user_interaction =

      scalar structure containing the fields:

        stop = [](0x1)
        info = {}(0x1)

    niter =  1
    nobjf =  6

I am not experienced with nonlin_min and chances are that I misunderstand something.

Kind regards 
--
Steph


reply via email to

[Prev in Thread] Current Thread [Next in Thread]