Skip to content

Commit

Permalink
Bug fix to EDM SBS
Browse files Browse the repository at this point in the history
Fitting is now more robust.
+ Update to plotting in main_0 script
  • Loading branch information
tsipkens committed Jan 20, 2024
1 parent 10cbc9e commit 8770102
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions +pp/edm_sbs.m
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@
ome = -0.8515; % Omega parameter in sigmoid function
a = 0.9966;
sigmoid = @(x) a ./ (1 + ...
exp(((log(x(1)) - log(dp_bin)) ./ log(x(2)) - bet) ./ ome));
exp(((log(x(1)) - log(dp_bin)) ./ x(2) - bet) ./ ome));
% x(1) = dpg, x(2) = spg

opts = optimset('Display','off');
x0 = [25, 1.05];
x0 = [dp_bin(find(Sa < 0.5, 1)), log(1.5)];
x1 = lsqnonlin(@(x) (sigmoid(x) - Sa) ./ 100, x0, [], [100, 1.1], opts);
x1 = real(x1);
x1(x1<0) = NaN;
Expand Down
2 changes: 1 addition & 1 deletion main_0.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@


figure(4);
loglog([Aggs_pcm.dp], [Aggs_edm.dp], '.');
loglog([Aggs_pcm.dp], [Aggs_edm.dp], 'o');
hold on;
loglog(xlim,xlim);
hold off;
Expand Down

0 comments on commit 8770102

Please sign in to comment.