Solving 5 nonlinear equations with fsolve
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I'm a newbie in matlab. I'm trying to solve the following nonlinear equation system but I don't know how:
Qevap-((500+0.85*(((0.711+0.56*15/100+0.73*(15/100)^2)*5.67*10^(-8)*(25+273.15)^4*(1-cos(30*pi/180))/2)-5.67*10^(-8)*(25+273.15)^4))*1.6*0.8*(1-0*2)*1-1.6*((32+6.4*2)*(Te-25)))=0;
Qcond-(2068.5072425+(-20.1259571429)*Tc+0.0701428571*Tc^2+(56.5615102375+(-0.0892494524)*Tc+(-0.0013878571)*Tc^2)*Te+(0.669960831250007+(-0.001477845238096)*Tc+0.000000357142857*Tc^2)*Te^2)=0;
Wcomp-(373.160515+(-0.7728)*Tc+0.0378095238*Tc^2+((-4.03604873)+0.2014116*Tc+0.0005034286*Tc^2)*Te+((-0.22703617375)+0.003774373809524*Tc+(-0.000001214285714)*Tc^2)*Te^2)=0;
Qcond-(70*(Tc-40))=0;
Qcond-(Wcomp+Qevap-12*(Tc-20))=0;
I already saw the help documentation but I don't understando how to solve for 5 equations.
0 Kommentare
Antworten (1)
John D'Errico
am 28 Dez. 2015
Bearbeitet: John D'Errico
am 28 Dez. 2015
I would just use the symbolic toolbox, finding 8 solutions.
syms Qevap Te Wcomp Qcond Tc
E1 = Qevap-((500+0.85*(((0.711+0.56*15/100+0.73*(15/100)^2)*5.67*10^(-8)*(25+273.15)^4*(1-cos(30*pi/180))/2)-5.67*10^(-8)*(25+273.15)^4))*1.6*0.8*(1-0*2)*1-1.6*((32+6.4*2)*(Te-25)))==0;
E2 = Qcond-(2068.5072425+(-20.1259571429)*Tc+0.0701428571*Tc^2+(56.5615102375+(-0.0892494524)*Tc+(-0.0013878571)*Tc^2)*Te+(0.669960831250007+(-0.001477845238096)*Tc+0.000000357142857*Tc^2)*Te^2)==0;
E3 = Wcomp-(373.160515+(-0.7728)*Tc+0.0378095238*Tc^2+((-4.03604873)+0.2014116*Tc+0.0005034286*Tc^2)*Te+((-0.22703617375)+0.003774373809524*Tc+(-0.000001214285714)*Tc^2)*Te^2)==0;
E4 = Qcond-(70*(Tc-40))==0;
E5 = Qcond-(Wcomp+Qevap-12*(Tc-20))==0;
result = solve(E1,E2,E3,E4,E5)
result =
Qcond: [8x1 sym]
Qevap: [8x1 sym]
Tc: [8x1 sym]
Te: [8x1 sym]
Wcomp: [8x1 sym]
vpa(result.Qcond)
ans =
206096.8437659089227610369512416
-79872.272069545160204450007603734
1480.0008801680255734628586801899
13408.004024141292656129583676207
10377.849121673682022577971691659
118026.5590524018573505429634831
1430.3277485980905870082908902277 - 10413.553488331644261070420163996i
1430.3277485980905870082908902277 + 10413.553488331644261070420163996i
Siehe auch
Kategorien
Mehr zu Calculus finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!