我有这个
clc, clear all, close all
tic
k1 = 1E-02:0.1:1E+02;
k2 = 1E-02:0.1:1E+02;
k3 = 1E-02:0.1:1E+02;
k = sqrt(k1.^2+k2.^2+k3.^2);
c = 1.476;
gamma = 3.9;
colors = {'b'};
Ek = (1.453*k.^4)./((1 + k.^2).^(17/6));
E = @(k) (1.453*k.^4)./((1 + k.^2).^(17/6));
E_int = zeros(1,numel(k));
E_int(1) = 1.5;
for i = 2:numel(k)
if k(i) < 400
E_int(i) = E_int(i-1) - integral(E,k(i-1),k(i));
elseif k(i) > 400
E_int(i) = 2.180/(k(i)^(2/3));
end %end if
end %end i
beta = (c*gamma)./(k.*sqrt(E_int));
figure
plot(k,beta,colors{1})
count = 0;
%F_11 = zeros(1,numel(k1));
F_33 = zeros(1,numel(k1));
之后,我应该将 F_33 计算为
for i = 1:numel(k1)
count = count + 1;
phi_33 = @(k2,k3) (1.453./(4.*pi)).*(((k1(i)^2+k2.^2+(k3 + beta(i).*k1(i)).^2).^2)./((k1(i)^2+k2.^2+k3.^2).^2)).*((k1(i)^2+k2.^2)./((1+k1(i)^2+k2.^2+(k3+beta(i).*k1(i)).^2).^(17/6)));
F_33(count) = 4*integral2(phi_33,0,1000,0,1000);
end
现在让我们来回答我的问题。我从一篇论文中知道:
k = sqrt(k1.^2+k2.^2+k3.^2);
k30 = k3 + beta.*k1;
k0 = sqrt(k1.^2+k2.^2+k30.^2);
E_k0 = 1.453.*(k0.^4./((1+k0.^2).^(17/6)));
因此 phi_33 的表达式将导致
phi_33 = (E_k0./(4*pi.*(k.^4))).*(k1.^2+k2.^2);
问题是:我怎样才能利用这个最终表达式插入我目前正在使用的长表达式(在 for 循环中)?
phi_33 的最后一个表达式更容易处理(特别是因为编写前者时的鲁莽错误),它会“通过引用传递”(k2,k3),这是自变量。
任何提示都非常受欢迎。
最好的问候, fpe