Get all vectors with possible values of each elements
1 view (last 30 days)
Show older comments
Of interest is n*1 vector of parameters. And each element (parameter) has m possible values. So the vector of parameters has m^n possible cases.
Problem:
I have m*1 vector (possible value) for each of the n parameters. Any idea how to efficiently/quickly get the minimizer of a func F(vector of parameters) out of all m^n possible cases of vector of parameters.
I am thinking about getting a n*(m^n) matrix A, with each column being one possible case of the vector of parameters. And run a loop of i=1:m^n, and get an objective value inputting A(:,i). But I'm not even sure how to do that without running a lot of loops.
If you guys can shed some light, I really appreciate it. Thx so much.
0 Comments
Accepted Answer
Star Strider
on 15 Feb 2019
There are a number of funcitons you can use to optimise your funciton. See the documentation on Nonlinear Optimization (link) for a list of them. There are even more options in the Global Optimization Toolbox (link).
0 Comments
More Answers (0)
See Also
Categories
Find more on Logical 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!