help-octave
[Top][All Lists]
Advanced

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

Re: nonlin_min function


From: Kai Torben Ohlhus
Subject: Re: nonlin_min function
Date: Mon, 6 Apr 2020 11:42:45 +0900
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

On 4/5/20 9:59 PM, Steph Bredenhann wrote:
> I'll appreciate some help with the nonlin_min function
> 
> My code is as follows and the objective function is included as a
> separate file. My problem is that GPL_x, the column vector of unknowns
> to be solved is returned as GPL_x0, the seed values.
> 
> % initialise the GPL parameters
> GPL_x = [0; 0; 0];  % in order D0 D1 m
>  
> % the first estimate of model parameters
> % in the GPL model D(t) = D0 + D1*(t)^m
> GPL_D0 = 0.0006; %0.000626249601623718;
> GPL_D1 = 0.0001; %0.000107587010307332;
> GPL_m  = 0.3     %0.312356329396664;     
>  
> % D_test = fn_GPL_model (GPL_D0, GPL_D1, GPL_m, BBR_tr)
>   
> GPL_D  = BBR_D(1,:);
> GPL_tr = BBR_tr(1,:);
> for ii = 2 : rows(BBR_D)
>   GPL_D  = [GPL_D, BBR_D(ii,:)];
>   GPL_tr = [GPL_tr, BBR_tr(ii,:)];
> endfor
>  
> fun_GPL = @(GPL_x)fn_BBR_GPL_RMSE (GPL_x, GPL_D, GPL_tr);
> %GPL_x0_lb = [1000.0; 1.0e6; 0.1; 0.0];
> %GPL_x0_ub = [3000.0; 4.0e6; 0.9; 1.0];
> GPL_x0 = [GPL_D0; GPL_D1; GPL_m];
> [GPL_x, GPL_RMSE, cvg, outp] =...
>    nonlin_min(fun_GPL, GPL_x0);
> GPL_D0 = GPL_x(1);
> GPL_D1 = GPL_x(2);
> GPL_m  = GPL_x(3);
>  
> I'll appreciate some advice, thank you very much.
> 
> -- 
> */Steph Bredenhann/*
> 


Dear Steph Bredenhann,

In your code, the variables "BBR_D" and "BBR_tr" are not defined.
Please, can you send a minimal working example to reproduce your problem?

Kai



reply via email to

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