how to optimize an input variable to a function to obtain a set point output variable?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
T_in_IC1 = 35;
T_in_DIC = 80;
T_in_a = 120;
[T_out_IC1,T_a_out_IC1] = IC1(m_w1,T_in_IC1,T_in_a);
T_a_in_IC2 = 23*T_a_out_IC1^0.5;
[T_out_IC2,T_a_out_IC2] = IC2(m_w1,T_out_IC1,T_a_in_IC2);
T_a_in_AC = 23*T_a_out_IC2^0.5;
[T_out_DIC] = DIC(m_w2,T_in_DIC,T_a_out_AC);
T_in_AC = T_out_DIC*(m_w1/(m_w1+m_w2)) + T_out_IC2*(m_w1/(m_w1+m_w2));
m_tot = m_w1 +m_w2;
[T_out_AC,T_a_out_AC] = AC(m_tot,T_in_AC, T_a_in_AC);
T_out_AC_sp = 90;
Diff = T_out_AC_sp - T_out_AC;
Basically, I want to write a code which gives me that value of m_tot for which Diff = 0, or close to 0; Also note that the input variables to AC are dependent on IC1,IC2, AND DIC. Also, one of the input to DIC1 is dependent on the output of AC
0 commentaires
Réponses (1)
Yogananda Jeppu
le 1 Oct 2017
Hi I am not sure I fully understand the question. What are IC1(), IC2() etc. They could be some complicated functions. You can look at fminsearch for any optimization. It works very help. Try the help for this function.
Voir également
Catégories
En savoir plus sur Nonlinear Optimization dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!