Minimize difference in vectors by varying scalar
12 views (last 30 days)
Show older comments
I am trying to use fmincon to minimize an equation of the form Smallest_difference(n) = Normal(n) - Altered(n). The Altered(n) vector is meant to be varied by changing one variable, say x, using fmincon. I am using fmincon because x has bounds of 0 < x < 0.25. Also, the minimum value of Smallest_difference(n) will be found at a single x value.
I'm trying to use this optimization to find a spot on the foot where a person's natural gait is least impacted if weight is added. Smallest_difference would be the difference between the normal gait and the altered gait, and would be found for a single value of x. X represents the length from the ankle to the added weight.
I tried to run the optimization and realized that fmincon only minimizes objective functions that return a scalar. Is there any way to get around this problem, like another constrained optimization function, or a loop?
Thanks!
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Nonlinear Optimization 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!