How can I solve for six variable using six equations using the Optimization toolbox such that the variables are between 1 and 0?
Afficher commentaires plus anciens
ConstStr
N7 = 3.135E+00*N1*N2,
N8 = 4.100E-01*N2*N6,
N9 = 1.381E+01*N1*N4,
N10 = 7.610E+01*N2^2*N3,
N11 = 1.720E+05*N2*N3^2*N5^3,
N12 = 4.034E+04*N3*N5^2,
N13 = 2.615E+04*N2*N3^2*N5^2,
N14 = 3.826E+44*N1*N3*N5^2,
N15 = 1.458E+03*N2*N3*N5,
N16 = 2.435E+04*N1*N3^2*N5,
N17 = 1.186E+08*N3^2*N5^3,
N18 = 7.511E+02*N3*N5,
N19 = 6.874E+02*N3*N5;
Function
N1+N2+N3+N4+N5+N6+N7+N8+N9+N10+N11+N12+N13+N14+N15+N16+N17+N18+N19 = 1;
0.1962*(N2+N7+N8+2*N10+N11+N13+N15)-0.6575*(N1+N7+N9+N14+N16) = 0;
0.0557*(N3+N10+2*N11+N12+2*N13+N14+N15+2*N16+2*N17+N18+N19)-0.4698*(N4+N9) = 0;
0.0099*(N5+3*N11+2*N12+2*N13+2*N14+N15+N16+3*N17+N18+N19)-0.3525*(N6+N8) = 0;
0.0557*(N1+N7+N9+N14+N16)-0.1962*(N4+N9) = 0;
0.0099*(N2+N7+N8+2*N10+N11+N13+N15)-0.6575*(N6+N8) = 0;
2 commentaires
TAHMEED TASNIM
le 1 Oct 2020
Alex Sha
le 11 Oct 2024
Looks like the code of 1stOpt, easy to get the results below:
n1: 0.0102966514928505
n2: 0.239882301416368
n3: 0.0756391320164553
n4: 0.067590437058481
n5: 9.05432951887928E-22
n6: 0.0124929422699874
Réponses (1)
Abhisek Pradhan
le 5 Oct 2020
Modifié(e) : Abhisek Pradhan
le 5 Oct 2020
0 votes
The following link has a detailed documentation and solved example of non-linear system of equations using Optimization Toolbox.
Catégories
En savoir plus sur Direct Search dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!