finding minimum of a multivariable function in a specific domain
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Konstantinos Theodorakis
el 8 de Jul. de 2017
Respondida: John D'Errico
el 9 de Jul. de 2017
I want to find the minimum of a multivariable function in a specific domain, which is a matrix. I have used fmincon, but it doesn't really help because the vector x of the minimum does not belong to the domain matrix i want it to. Having a specific domain is important for me because every variable of the function is connected with the others in a specific way; the variables are not independent. What do you suggest?
0 comentarios
Respuesta aceptada
Walter Roberson
el 9 de Jul. de 2017
Evaluate the function on every permitted combination of variables from the domain. Use min() to find the lowest of them.
... perhaps we do not understand what you mean by having a "specific domain which is a matrix" ?
0 comentarios
Más respuestas (1)
John D'Errico
el 9 de Jul. de 2017
What is wrong with the function min? You can use it to find the minimum value in the entire matrix, as well as where it came from.
A = rand(10,10,10);
[minA,minind] = min(A(:));
[minI,minJ,minK] = ind2sub(size(A),ind)
minI =
4
minJ =
8
minK =
10
If you really are asking to find a location that is intermediate to elements in the matrix, thus interpolation, then you need to use a tool for interpolation, one that is capable of a smoothly varying interpolation. Even then, there will potentially be multiple local solutions, and the result will only be as good as your method of interpolation.
0 comentarios
Ver también
Categorías
Más información sobre Interpolation en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!