Why am I getting the following error when I am using function for generating random number?

6 Ansichten (letzte 30 Tage)
x = random('Poisson',1:100,1,10);
Error using poissrnd (line 28)
Size information is inconsistent.
Error in prob.PoissonDistribution.randfunc (line 177)
[varargout{1:nargout}] = poissrnd(varargin{:});
Error in random (line 140)
r = feval(spec.randfunc,varargin{:});

Antworten (1)

KSSV
KSSV am 4 Okt. 2016
Bearbeitet: KSSV am 4 Okt. 2016
You must try either
x = random('Poisson',1:100,1,100);
or
x = random('Poisson',1:10,1,10);
doc random

Kategorien

Mehr zu Dates and Time finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by