neff = zeros(numel(R),N);
phi0val = zeros(numel(R),N);
for j = 1:numel(R)
for i= 1:N
funct = @(Rv,phi0) (4*pi*(Nd-Nd*exp(-phi0))*Rv.^2);
equation = @(phi0)integral(@(Rv)funct(Rv,phi0),0,R(j))-(4*pi*R(j)^2*Nt(i)/(1+2*exp((Et_Ef + K.*T(i) .*(phi0 + (1/6)*(R(j)/Ld)^2))./(K.*T(i)))));
phi0val(j,i) = fzero(equation,40);
funneff= @(Rv)1./(4/3.*pi.*Rv.^3).*(Nd.*exp(-phi0val(j,i))).*Rv.^2;
neff(j,i)= (1./(4./3.*pi.*R(j).^3)).*4.*pi.*integral(funneff,0,R(j),'Arrayvalued',true);
end
end
figure
hold all
for k = 1:size(neff,1)
plot(neff(k,:),phi0val(k,:))
end
hold off
expstr = @(x) [x(:).*10.^ceil(-log10(abs(x(:)))) floor(log10(abs(x(:))))];
Rexp = expstr(R)
hl = legend(sprintfc('$R\\ =\\ %2d\\times10^{%d}$',Rexp));
hl.Interpreter = 'latex';
Best Answer