- min. f(x)+beta*var(x)
- min. f(x)+beta*norm(diff(x))^2
Objective Function for Symmetrical Solution with fmincon?
1 view (last 30 days)
Show older comments
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 Comments
See Also
Categories
Find more on Nonlinear Optimization in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!