Hi I would like to generate a number between 300 and 450. I also would like which is the possible ways to generate numbers on Matlab? Is there a Poisson generator for random numbers? And what does the initial seed mean?
Kshitij Singh answered .
2025-11-20
% Regular Poisson distribution
lambda = (300+450)/2; % To put the mean in the middle of the range
d = makedist('poisson', 'lambda', lambda)
% Truncated Poisson distribution
td = d.truncate(300, 450)
td.random(10,1) % Generate 10 random numbers in the range [300 450]