Skip to content

Commit

Permalink
fix median method for PiecewiseLinear and Poisson distribution classdefs
Browse files Browse the repository at this point in the history
  • Loading branch information
pr0m1th3as committed Feb 18, 2024
1 parent da56cd3 commit 54a4a4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion inst/dist_obj/PiecewiseLinearDistribution.m
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ function disp (this)
Fa_b = plcdf ([lx, ux], this.x, this.Fx);
m = plinv (sum (Fa_b) / 2, this.x, this.Fx);
else
m = plstat (this.x, this.Fx);
m = plinv (0.5, this.x, this.Fx);
endif
endfunction

Expand Down
2 changes: 1 addition & 1 deletion inst/dist_obj/PoissonDistribution.m
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ function disp (this)
Fa_b = poisscdf ([lx, ux], this.lambda);
m = poissinv (sum (Fa_b) / 2, this.lambda);
else
m = this.lambda .* sqrt (2 * log (2));
m = poissinv (0.5, this.lambda);
endif
endfunction

Expand Down

0 comments on commit 54a4a4a

Please sign in to comment.