MATLAB Answers


Optimization problem with a function of 2 parameters

Stathis Kritikos さんによって質問されました 2019 年 5 月 9 日
最新アクティビティ Stathis Kritikos さんによって コメントされました 2019 年 5 月 11 日
I have a function with h, t parameters. And i want to find the values of the parameters that minimise the function. My function is quadratic and i have inequalities for the 2 parameters. h=[1.1;inf]; and t=[1000;10000];
I am trying to use the fmincon function as i have constrained nonlinear multivariable function but i dont find an example of a function with 2 parameters. Can you write an example of fmincon function for a function with 2 parameters? Can you tell me how can i find the 'x0' value?

  4 件のコメント

Stathis Kritikos 2019 年 5 月 9 日
my function is f(h,t). all the examples are f(x). I want to minimize f(h,t) when h=[1.1;inf]; and t=[1000;10000]. is there an example for my problem?
Thank you for the answer.
2019 年 5 月 9 日
Set h = x(1) and t = x(2).
Stathis Kritikos 2019 年 5 月 10 日
TC=@(h,t) (QC(h)+FC(t)+RC)./E(t)
I have this function. and i want to find h,t when TC is minimized. when h=(1.5*10^-5:2.5*10^-5) and t=(1000 :100000). Which function of the optimization toolbox can i use and how. TC is a big quadratic function.
The paper i am reading says that i have to implement an SQP. But as i said the fynction is too big to find all the matrix in order to formulate sqp.
Thank you

サインイン to comment.

1 件の回答

回答者: Torsten
2019 年 5 月 10 日

TC = @(x) (QC(x(1))+FC(x(2))+ RC)/E(x(2));
lb = [1.5e-5,1000];
ub = [2.5e-5,100000];
sol = fmincon(TC,[2e-5,10000],[],[],[],[],lb,ub)

  10 件のコメント

2019 年 5 月 10 日
You can choose the algorithm under "options" :
Stathis Kritikos 2019 年 5 月 10 日
If i choose the code you wrote me before,i have a problem?fmincon is not an sqp method?
Stathis Kritikos 2019 年 5 月 11 日
Matlab shows to me a result of this format at the end of optimization. what does it mean?
sol =
1.0e+04 *
0.0000 9.9927
Which is the x1 and which is the x2?

サインイン to comment.

Translated by