[Matlab]Desperate help with a simple code.

조회 수: 1 (최근 30일)
Hadi
Hadi 2014년 10월 20일
댓글: Hadi 2014년 10월 20일
How Can I generate 1,000,000 random integers with range of [5 -----> 18] in a square matrix using the randi fucntion? Thank you.

채택된 답변

Roger Stafford
Roger Stafford 2014년 10월 20일
편집: Roger Stafford 2014년 10월 20일
M = randi([5,18],1000);
  댓글 수: 1
Hadi
Hadi 2014년 10월 20일
Thank you so much. Can I ask you one more question? How about finding the probability of a certain number and a range of certain numbers at M?

댓글을 달려면 로그인하십시오.

추가 답변 (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