how can i create 12 monthly maxima from a uniform distribution between 0 and 6? (using unifrnd)

조회 수: 1 (최근 30일)
I've tried use the function unifrnd to create for each of 12 months, a random value from 0 to six but something goes wrong. I've used this code:
>> a = 0; b = 1:6; >> R = unifrnd(a,b,[1,12])

채택된 답변

Andrei Bobrov
Andrei Bobrov 2018년 7월 4일
R = unifrnd(a,b(end),[1,12]);
or
R = rand(1,12)*b(end);

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by