a Matlab problem# Computation - 科学计算
P*t
1 楼
lambda = 1:1:200;
for a = 1:200
x4(a) = 0.5*(-4*pi+acot(0.5*sqrt(lambda(a))*cot(sqrt(lambda(a)))-0.5));
end
syms z xk % z is \kappa*r_0
for b=1:200
temp(b) = x4(b);
f = 0.5+z*exp(xk)*(-0.5*(besselk(2*i-1,z*exp(xk))+besselk(2*i+1,z*exp(xk
))))/besselk(2*i,z*exp(xk)) - sqrt(1-(z^2)*exp(2*xk))*cot(sqrt(1-(z^2)*exp(2
*xk)));
solve(subs(f,xk,temp(b)),z);
end
//solve解不出来怎么办?
for a = 1:200
x4(a) = 0.5*(-4*pi+acot(0.5*sqrt(lambda(a))*cot(sqrt(lambda(a)))-0.5));
end
syms z xk % z is \kappa*r_0
for b=1:200
temp(b) = x4(b);
f = 0.5+z*exp(xk)*(-0.5*(besselk(2*i-1,z*exp(xk))+besselk(2*i+1,z*exp(xk
))))/besselk(2*i,z*exp(xk)) - sqrt(1-(z^2)*exp(2*xk))*cot(sqrt(1-(z^2)*exp(2
*xk)));
solve(subs(f,xk,temp(b)),z);
end
//solve解不出来怎么办?