Error when solving an equation involving a poisson pdf

2 次查看(过去 30 天)
Hello, I am trying to find for what values of lambda P(X=10) = 0.1, if X~Po(lambda)
My code is:
syms lambda
solve(poisspdf(10,lambda)==0.1, lambda)
the error I get is:
'error using symengine. Unable to prove 'lambda<0' literally . Use 'isAlways to test the statement mathematically
any help would be much appreciated!

采纳的回答

Star Strider
Star Strider 2019-11-17
Try this (instead of using the Symbolic Math Toolbox):
lambda = fzero(@(lambda) poisspdf(10, lambda) - 0.1, 5)
producing:
lambda =
8.0299
  3 个评论
Louis Sharma
Louis Sharma 2019-11-18
actually I was able to ge the second solution by changing the range. Thanks
Star Strider
Star Strider 2019-11-18
As always, my pleasure!
(I was sleeping, not ignoring you!)

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Number Theory 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by