Skip to content
Snippets Groups Projects
Commit aa4c9dd8 authored by Lars Hubatsch's avatar Lars Hubatsch
Browse files

Frank's solution to probability problem via Laplace transform. Weirdly only...

Frank's solution to probability problem via Laplace transform. Weirdly only works for one side right now.
parent 1d6c50d7
No related branches found
No related tags found
No related merge requests found
%% Frank's solution to the transfer/rate problem via Laplace transform
x0 = 1;
p_out = @(D_p, D_m, ga, x0, x, t) 1./(2*sqrt(D_p*pi*t))*...
(exp(-(x+x0).^2./(4*D_p*t))*(ga*sqrt(D_p)-sqrt(D_m))./...
(ga*sqrt(D_p)+sqrt(D_m))+exp(-(x-x0).^2./(4*D_p*t)));
p_in = @(D_p, D_m, ga, x0, x, t) 1./(sqrt(pi*t)*(sqrt(D_m)+ga*sqrt(D_p)))*...
exp(-(x-x0*sqrt(D_m/D_p)).^2/(4*D_m*t));
x_in = linspace(-4, 0, 1000);
x_out = linspace(0, 4, 1000);
for i = 1:100
figure(1); hold on; cla;
plot(x_out, p_out(0.85, 0.15, 1/5.66, x0, x_out, i/10));
plot(x_in, p_in(0.85, 0.15, 1/5.66, x0, x_in, i/10));
axis([-4, 4, 0, 2]);
shg; pause();
end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment