getting error , i want to solve 6 equation by fsolve
1 次查看(过去 30 天)
显示 更早的评论
2 个评论
回答(2 个)
madhan ravi
2018-12-16
编辑:madhan ravi
2018-12-16
x0=[1;1;1;1;1;1];
xsol=fsolve(@(x) solar(x),x0) % function call
function F= solar(x) % function definition
j=5.67e-8;
M=40;
Cp=4180;
f = 0.88;
L=1;
hci=100;
Aap=1.9;
od=0.03;
e=0.9;
Hab=500;
Tfi=40;
Ta=20;
W=1;
hw=67.83;
Q=x(1);
U=x(2);
hr=x(3);
Tr=x(4);
Tfm=x(5);
Tfo=x(6);
F(1) = Q-Aap*f*(Hab-(pi*od*U*(Tfi-Ta))/(W-od));
F(2) = U-hw-hr;
F(3) = hr-e*j*(Tr+Ta)*(Tr^2+Ta^2);
F(4) = (Tr-Tfm)*(hci*pi*od*L)-M*Cp*(Tfo-Tfi);
F(5) = 2*Tfm-Tfi-Tfo;
F(6) = M*Cp*(Tfo-Tfi)-Q;
end
Gives:
xsol =
615.3736
67.9034
0.0734
105.2950
40.0018
40.0037
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!