generate uniform random numbers between -1 and +1 in matlab

조회 수: 2 (최근 30일)
Sajid Sarwar
Sajid Sarwar 2019년 12월 14일
댓글: Image Analyst 2019년 12월 14일
how o generate uniform random numbers between -1 and +1 in matlab?

채택된 답변

David Hill
David Hill 2019년 12월 14일
  댓글 수: 2
Sajid Sarwar
Sajid Sarwar 2019년 12월 14일
I need a random array between -1 & 1
Image Analyst
Image Analyst 2019년 12월 14일
Did youi look at the help for rand()? It answers both your original question and this follow up question
randomMatrix = 2 * rand(rows, columns) - 1;
where you set rows and columns to whatever values you want.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Random Number Generation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by