- min. f(x)+beta*var(x)
- min. f(x)+beta*norm(diff(x))^2
Objective Function for Symmetrical Solution with fmincon?
1 次查看(过去 30 天)
显示 更早的评论
Hello,
I am writing a code that uses fmcinon to solve for the solution of a system that is constrained by various linear and nonlinear equality constraints (no inequality constraints). In addition to finding the solution that provides the smallest f(x), I would also like to create an objective function that will find the most symmetrical solution. By symmetrical, I mean that the values inside x are as close to one another as possible.
Here's a few ideas I've been playing with.
1) f = sum(x^2)
2) f = sum(x^2) / length(x)
3) xAverage = sum(x) / length(x)
cost = sum((x - xAvg).^2) / length(x)
Any thoughts or suggestions? Thanks!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Nonlinear Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!