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

3 Ansichten (letzte 30 Tage)
how o generate uniform random numbers between -1 and +1 in matlab?

Akzeptierte Antwort

David Hill
David Hill am 14 Dez. 2019
  2 Kommentare
Sajid Sarwar
Sajid Sarwar am 14 Dez. 2019
I need a random array between -1 & 1
Image Analyst
Image Analyst am 14 Dez. 2019
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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Random Number Generation finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by