虽然麻烦,但应该可以,用for语句。下面是个简单的例子:
Function
1/(x1+x2*(160.73)^(x3))+x4*(160.73)^x5-(6302.25)-(0.1*1) = 0;
1/(x1+x2*(111.85)^(x3))+x4*(111.85)^x5-(2090.46)-(0.1*2) = 0;
1/(x1+x2*(67.717)^(x3))+x4*(67.717)^x5-(487.44)-(0.1*3) = 0;
1/(x1+x2*(53.836)^(x3))+x4*(53.836)^x5-(1452.07)-(0.1*4) = 0;
1/(x1+x2*(40.602)^(x3))+x4*(40.602)^x5-(5557.26)-(0.1*5) = 0;
可以写成:
Constant a=[160.73,111.85,67.717,53.836,40.602],
b=[6302.25,2090.46,487.44,1452.07,5557.26];
Function For(i=1:5,a,b)(1/(x1+x2*a^(x3))+x4*a^x5-b=0.1*i); |