fminsearch output size bigger than the variables to optimize?
조회 수: 4 (최근 30일)
이전 댓글 표시
So I'm trying to optimize some variables in a function with fminsearch, the code i wrote looks like this:
[solution] = fminsearch(@(parameters)NRTL_FO(T,x1,y1,P,ABC_C1,ABC_C2,parameters),[10000 1000 0,2]);
The beginning of the function NRTL_FO looks like this:
function [obj] = NRTL_FO(T,x1,y1,P,ABC_C1,ABC_C2,parameters)
g12_g22 = parameters(1);
g21_g11 = parameters(2);
alpha = parameters(3);
...
...
so there are 3 parameters to optimize, but the result that i'm getting is this:
solution =
1.0e+03 *
2.1437 -0.7804 -0.0012 0.3405
Why am I getting a 1x4 size solution when the parameters that im optimizing are 3 ?
Hope you can help me, thanks.
댓글 수: 0
채택된 답변
Torsten
2023년 3월 5일
[10000 1000 0.2]
instead of
[10000 1000 0,2]
as the vector of initial conditions.
MATLAB is not Excel.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!