constrained optimization with Matlab, symbolic function
古いコメントを表示
Hello, I want to perform a simple optimization in Matlab
syms f(x,a) x a n
over
Max
Max
such that
and for each i 

and n are known I dont know how to define the constraints on Matlab and the Max optimization
Thanks
回答 (1 件)
If your function f is symbolic, you first have to convert it to a numerical function by using "matlabFunction".
k_tot = ...;
a = ...;
x = ...;
f = @(x,a) ...;
obj = @(k) sum(k.*f(x,a).^k)
Aeq = ones(n,1);
beq = k_tot;
lb = ones(n,1);
ub = inf(n,1);
k0 = k_tot/n*ones(1,n)
k = fmincon(obj,k0,[],[],Aeq,beq,lb,ub)
カテゴリ
ヘルプ センター および File Exchange で Nonlinear Optimization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!