i want to generating random numbers on matrix 1x30
how i get generating 2 random numbers (only 1 and 4 , not between) ???

 채택된 답변

Chunru
Chunru 2021년 9월 17일
편집: Chunru 2021년 9월 17일
a = randi([0 1], [1 30])*3 + 1
a = 1×30
1 1 4 4 4 4 4 1 1 4 1 4 4 4 1 4 4 4 1 1 1 4 1 4 4 1 4 4 4 4

댓글 수: 2

ohhhh thank you bro/sist
Chunru
Chunru 2021년 9월 17일
Consider to accept the answer.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Random Number Generation에 대해 자세히 알아보기

제품

릴리스

R2021a

질문:

2021년 9월 17일

댓글:

2021년 9월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by