我试图解决三个积分方程组来获得三个因子。方程式如下:
需要求解这些方程以获得a1,a2和amp; A3。如果它不是第三项中具有可变上限的双积分,那么使用MATLAB求解该系统相对容易。但是,只要将这个双积分输入到MATLAB代码中,我就会看到一条错误消息。 这是我的代码:
function solveIntegralForB
clc
clear all
% Extruder screw specifications
AB0=[1 1 1]
%optz1 = optimset('TolX',1e-32);
bfound = fsolve(@fminsearch,AB0)%,optz1)
function output = fminsearch(AB)
HH=1;
yS1 = 0;
yE1 = HH;
yS2 = 0;
yE2 = HH;
zS3=0;
zE3= @ (y) y;
yS3 = 0;
yE3 = HH;
L1=50;
L2=10;
L3=0;
%L=L';
Inty1=integral(@Func1,yS1,yE1);
Inty2=integral(@Func2,yS2,yE2);
Inty3=integral2(@Func3,yS3,yE3,zS3,@ (y) y);
%output = (L1 - Inty1)^2+(L2 - Inty2)^2;
output(1) = (L1 - Inty1)^2;
output(2) = (L2 - Inty2)^2;
output(3) = (L3 - Inty3)^2;
% factors in Eq.17 from reference
% AB(1)=A, AB(2)=A1, AB(3)=B1
sOut=size(output);
function fy1 = Func1(y)
BB=1;
fy0=sqrt((AB(1)*y+AB(2)).^2+(BB*y+AB(3)).^2);
fyy=((1+fy0).^2)./(1-fy0); % F(y) in Eq.17
fAy=(AB(1)*y+AB(2))./(1-fy0);
fy1=fyy.*fAy;
end
function fy2 = Func2(y)
BB=1;
fy0=sqrt((AB(1)*y+AB(2)).^2+(BB*y+AB(3)).^2);
fyy=((1+fy0).^2)./(1-fy0); % F(y) in Eq.17
fBy=(BB*y+AB(3))./(1-fy0);
fy2=fyy.*fBy;
end
function fy3 = Func3(y)
BB=1;
fy0=sqrt((AB(1)*y+AB(2)).^2+(BB*y+AB(3)).^2);
fyy=((1+fy0).^2)./(1-fy0); % F(y) in Eq.17
fAy=(AB(1)*y+AB(2))./(1-fy0);
fy3=fyy.*fAy;
end
end
end
以下是错误消息:
Error using LeonExtruder/fminsearch/Func3
Too many input arguments.
Error in integral2Calc>integral2t/tensor (line 228)
Z = FUN(X,Y); NFE = NFE + 1;
Error in integral2Calc>integral2t (line 55)
[Qsub,esub] = tensor(thetaL,thetaR,phiB,phiT);
Error in integral2Calc (line 9)
[q,errbnd] =
integral2t(fun,xmin,xmax,ymin,ymax,optionstruct);
Error in integral2 (line 106)
Q = integral2Calc(fun,xmin,xmax,yminfun,ymaxfun,opstruct);
Error in LeonExtruder/fminsearch (line 34)
Inty3=integral2(@Func3,yS3,yE3,zS3,@ (y) y);
Error in fsolve (line 230)
fuser = feval(funfcn{3},x,varargin{:});
Error in LeonExtruder (line 12)
bfound = fsolve(@fminsearch,AB0)%,optz1)
Caused by:
Failure in initial objective function evaluation. FSOLVE
cannot continue.