Borrar filtros
Borrar filtros

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

1 visualización (últimos 30 días)
how o generate uniform random numbers between -1 and +1 in matlab?

Respuesta aceptada

David Hill
David Hill el 14 de Dic. de 2019
  2 comentarios
Sajid Sarwar
Sajid Sarwar el 14 de Dic. de 2019
I need a random array between -1 & 1
Image Analyst
Image Analyst el 14 de Dic. de 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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Random Number Generation en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by