function F = comp(x)
F(1) = (((x(1)+x(2)-x(6))*(2*x(1)+x(2)+x(3)+x(4))^2))/((100-x(1)-x(3)+x(5)-x(6))*((1467-4*x(1)-3*x(2)-x(3)-x(4)+2*x(6))^4)) - 2.937*10^5;
F(2) = ((x(1)+x(2)-x(6))*(2*x(1)+x(2)+x(3)+x(4)))/((100-x(2)+x(3)-x(4)-2*x(5)+2*x(6))*(1467-4*x(1)-3*x(2)-x(3)-x(4)+2*x(6))^3) - 1.046*10^7;
F(3) = ((100-x(2)+x(3)-x(4)-2*x(5)+2*x(6))*(2*x(1)+x(2)+x(3)+x(4)))/((100-x(1)-x(3)+x(5)-x(6))*(1467-4*x(1)-3*x(2)-x(3)-x(4)+2*x(6))) - 0.02808;
F(4) = (2*x(1)+x(2)+x(3)+x(4))/((100-x(2)+x(3)-x(4)-2*x(5)+2*x(6))*(467-4*x(1)-3*x(2)-x(3)-x(4)+2*x(6))) - 5.555*10^5;
F(5) = (100-x(1)-x(3)+x(5)-x(6))/((100-x(2)+x(3)-x(4)-2*x(5)+2*x(6))^2) - 1.978*10^6;
F(6) = (((1467-4*x(1)-3*x(2)-x(3)-x(4)+2*x(6))^2)*(100-x(2)+x(3)-x(4)-2*x(5)+2*x(6))^2)/((x(1)+x(2)-x(6))*(100-x(1)-x(3)+x(5)-x(6))) - 1.166*10^(-9);
end
function chem
fun = @comp;
x0 = [0,0,0,0,0,0];
x= fsolve(fun,x0)
CO = 100-x(2)+x(3)-x(4)-2*x(5)+2*x(6)
CO2 = 100-x(1)-x(3)+x(5)-x(6)
H2 = 1467-4*x(1)-3*x(2)-x(3)-x(4)+2*x(6)
CH4 = x(1)+x(2)-x(6)
H2O = 2*x(1)+x(2)+x(3)+x(4)
C = x(4)+x(5)
end
비선형 연립방정식을 풀고 싶은데 실행하면 입력 인수가 부족하다고 나오네요 ㅠ
어떻게 해결해야 풀릴까요?