How to create random sequence?
5 次查看(过去 30 天)
显示 更早的评论
How to generate gaussain random sequence with mean = 817e-9 and standard deviation = 10e-9 and probability = 0.25 (total 50 numbers)
0 个评论
采纳的回答
Dyuman Joshi
2024-4-22
avg = 817e-9;
sd = 10e-9;
N = 50;
seq = avg + sd*randn(1, N)
I am not sure about the probability, so I asked MATLAB AI Chat Playground about that and it provided the following -
seq(rand(1,N)>0.25) = 0
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Random Number Generation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!