not enough input arguments using variables from another equation system
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi, Im modeling a series of cstr
clc
clear
close all
x1 = [0;0;0];
x = fsolve(@TAC1,x1)
function y = TAC1(x)
eq1 = 7*x(1)+0.437*(x(1)^0.5)*(x(2)^0.5)-5/10;
eq2 = 7*x(2)+0.437*(x(1)^0.5)*(x(2)^0.5)-2/10;
eq3 = 0.437*(x(1)^0.5)*(x(2)^0.5)-7*x(3);
y=[eq1,eq2,eq3];
end
z2 = [0;0;0];
z = fsolve(@TAC2,z2)
function y = TAC2(x,z)
eq4 = 7*x(1)-8*z(1)-0.437*(z(1)^0.5)*(z(2)^0.5);
eq5 = 7*x(2)-8*z(2)-0.437*(z(1)^0.5)*(z(2)^0.5)+1/100;
eq6 = 7*x(3)-8*z(3)+0.437*(z(1)^0.5)*(z(2)^0.5);
y=[eq4,eq5,eq6];
end
this is what i have so far, i also tried to make the first 3 results as variables but that didnt work.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!