Hello all, I would like to kindly ask for your help, if you are familiar with optimization how i can modeling this function by minimize f
Mostrar comentarios más antiguos
T(1)=20, Ts=24, P=3 , i=[1..24], load('C.mat','C')
p(i)=p*S(i)
min f=P(i)*C(i)
if T(i)>Ts then S(i)=0
else if T(i)>Ts then S(i)=1
end
T(i+1)=0.25*T(i)+(0.07*2.5*p(i))/0.14
Respuestas (1)
Alan Weiss
el 25 de Mzo. de 2015
0 votos
I am not sure what you are asking. Do you have a fixed array and you are trying to scan the array and find the location and value of the minimum? In that case, use the min function.
If, however, you have a function of a multidimensional continuous variable, then you might want to consult the documentation for fminsearch, which can minimize functions of several variables.
If neither of those satisfy you, then please try asking a question in complete sentences so we don't have to guess at what you mean.
Alan Weiss
MATLAB mathematical toolbox documentation
2 comentarios
jamal abushnaf
el 29 de Mzo. de 2015
Alan Weiss
el 30 de Mzo. de 2015
I am not sure what your control variables are, meaning the variables that you can change in order to try to optimize something. But your problem sounds like a linear programming problem. See this example and the function reference page for details.
Alan Weiss
MATLAB mathematical toolbox documentation
Categorías
Más información sobre Choose a Solver en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!