필터 지우기
필터 지우기

not choosing random numbers from the range specified

조회 수: 1 (최근 30일)
ker fang fang
ker fang fang 2015년 1월 19일
댓글: ker fang fang 2015년 1월 19일
xrange = 50:100;
a= randi(numel(xrange),10,1);
why is it not choosing from the range 50 to 100? can anyone help me?

채택된 답변

Mohammad Abouali
Mohammad Abouali 2015년 1월 19일
Because that's not how that function is called.
If you want to randomly select 10 numbers within the range of 50 and 100 this is the command:
randi([50,100],10,1)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by