Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想定义一个pdf,例如:
g(x):P(x=0)=1. and P(x!=0)=0.
即当x = 0时出现唯一非零概率的pdf。有任何想法吗?谢谢
对于这些情况,分段是一个有用的工具:
g[x_] := Piecewise[{{1, x == 0}}, 0]
以上应该为您完成工作。
笔记:
DiracDelta[0]=无穷大;这显然不等于1。