Borrar filtros
Borrar filtros

create random number with gaussian distribution

1 visualización (últimos 30 días)
evangeline
evangeline el 18 de Feb. de 2018
Respondida: Birdman el 18 de Feb. de 2018
I need to create a random number with gaussian distribution and with average value of 0 and var of 1. like N(0,1). and also a N(0,10). how can i do this with matlab?

Respuesta aceptada

Birdman
Birdman el 18 de Feb. de 2018
For one single number, use
R = normrnd(0,1)
for an 1x10 array:
R = normrnd(0,1,[1 10])

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