如何编写自变量个数未定的目标函数。
Show older comments
我有一个优化问题
目标函数是 (C+x1) * (C + x2) * (C+ x3) * ... 自变量x的个数由前面的程序给出
约束函数是标准的线性函数
A * [ x1; x2; x3; ...] <= CC
我的问题是:
比如自变量的个数是N,那么如何写目标函数呢?
用M文件不方便吧?
用函数句柄该怎么写?
以及:
该优化问题可以用fmincon来求解吧
Accepted Answer
More Answers (0)
Categories
Find more on 非线性方程组 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!