常用函数解释
1. fmincon函数
(仅供自己参考学习)
用于求解线性/非线性规划问题
https://www.cnblogs.com/Kingham/p/12042068.html
https://www.cnblogs.com/qxpdbk/p/5671023.html
https://www.cnblogs.com/suncoolcat/p/3315385.html
具体形式;
总:[x, fval, exitflag, output] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub, nonlcon, options)
% exitflag : 结束标记
% output : 非线性规划计算过程的相关信息
%options : 优化选项 → options = optimoptions (‘fmincon’, ‘Display’, ‘iter’, ‘MaxIterations’, 50)
% AX <= B, AeqX = Beq (linear constraints)
% C(X) <= 0, Ceq(X) = 0 (nonlinear constraints)
% LB <= X <= UB (bounds)
常用:[x, fval] = fmincon (fun, x0, A, b, Aeq, beq, lb, ub, nonlcon)
% fun → 自定义的 MATLAB 函数 → 目标函数 f (x)
% x0 → 待求变量 x 的迭代初值 → 估计值