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

Generalizing jump lengths distros.

parent 6bd32925
No related branches found
No related tags found
No related merge requests found
...@@ -193,7 +193,7 @@ params = {-5, b(7.7/3, 10^-6), 0.5, e(7.7/3), 0, 1, 10, 7, 0,... ...@@ -193,7 +193,7 @@ params = {-5, b(7.7/3, 10^-6), 0.5, e(7.7/3), 0, 1, 10, 7, 0,...
'Constituent', 0}; 'Constituent', 0};
t = [0, 0.05, 0.1, 1]; t = [0, 0.05, 0.1, 1];
direc = 1; direc = 1;
x0 = sort(5-direc*(0:0.001:3.01)); x0 = sort(5-direc*(0:0.001:4.01));
%% Run simulations for 'delta' IC across outside %% Run simulations for 'delta' IC across outside
T = {}; T = {};
parfor i = 1:length(x0) parfor i = 1:length(x0)
...@@ -205,19 +205,23 @@ parfor i = 1:length(x0) ...@@ -205,19 +205,23 @@ parfor i = 1:length(x0)
end end
% save prob_laplace_X_7_7_short_2 % save prob_laplace_X_7_7_short_2
%% Calculate probabilities for each jump length in ls. %% Calculate probabilities for each jump length in ls.
ls = -direc*(0.000:0.001:3); l_max = 4;
t_ind = 4;
ls = -direc*(0.000:0.001:l_max);
p = nan(1, length(ls)); p = nan(1, length(ls));
tic tic
parfor i = 1:length(ls) parfor i = 1:length(ls)
tic tic
p(i) = int_prob(ls(i), T, x0, direc, 3, 5, 0); p(i) = int_prob(ls(i), T, x0, direc, t_ind, 5, 0);
toc toc
end end
toc toc
%% Normalization factor %% Normalization factor
N = normalization(T, x0, 0, 3, direc, 5) N = normalization(T, x0, 0, t_ind, direc, -params{1})
% N = sum(p)*0.001; % N = sum(p)*0.001;
% m = sum(ls.*p/N)/3001*3; m = sum(ls.*p/N)/length(p)*l_max;
% should sum to one
sum(p/N)/length(p)*l_max
%% %%
sum((T{1}.sol(1, 1:end-1)+T{1}.sol(1, 2:end))/2.*diff(T{1}.x)) sum((T{1}.sol(1, 1:end-1)+T{1}.sol(1, 2:end))/2.*diff(T{1}.x))
%% Do we need to look at the left side as well? %% Do we need to look at the left side as well?
......
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