FMINCON does not optimize error function
Ältere Kommentare anzeigen
I am trying to minimize the error between two price functions using the mean squared error. I want to minimize the error by changing five variables used in the first price function. After the optimization ran, the new error I get is huge (in the millions, I would expect getting a small decimal number) and the problem does not seem to be optimized at all. Someone please tell me what's wrong.
This is my code:
Z = [a, b, c, d, e];
MSE = @(Z) (immse(price1(Z(1),Z(2),Z(3),Z(4),Z(5)),price2));
initial =[0.1, 0.1, 0.1, 0.1, 0.1];
lb = [0, 0, 0, 0, 0];
ub = [1, 1, 1, 1, 1];
nonlcon = @myconstraint;
Z1 = fmincon(MSE,initial,[],[],[],[],lb,ub,nonlcon)
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Solver Outputs and Iterative Display finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!