필터 지우기
필터 지우기

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

조회 수: 9 (최근 30일)
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{:});

답변 (1개)

KSSV
KSSV 2016년 10월 4일
편집: KSSV 2016년 10월 4일
You must try either
x = random('Poisson',1:100,1,100);
or
x = random('Poisson',1:10,1,10);
doc random

태그

Community Treasure Hunt

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

Start Hunting!

Translated by