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
Show older comments
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
Answers (1)
Alan Weiss
on 25 Mar 2015
0 votes
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 Comments
jamal abushnaf
on 29 Mar 2015
Alan Weiss
on 30 Mar 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
Categories
Find more on Choose a Solver 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!