# How to create a 1400 × 2 matrix of normally distributed random multiples of 10?

3 visualizaciones (últimos 30 días)
Martina el 2 de Oct. de 2022
Comentada: Martina el 2 de Oct. de 2022
I'm trying to create a 1400 × 2 matrix of normally distributed random multiples of 10 (i.e. 200, 210,
220, etc.) with a mean of 500 and a standard deviation of 100, using randn, round , and
other operations. So far I have:
mu = 500;
stdev = 100;
s = round([(randn(1400,2) * stdev) + mu])
..but I have trouble with the "multiples of 10".. how do I implement the command to only display random (!!) multiples of 10? Thank you.
##### 3 comentariosMostrar 1 comentario más antiguoOcultar 1 comentario más antiguo
Matt J el 2 de Oct. de 2022
Editada: Matt J el 2 de Oct. de 2022
What is asked makes no sense. "Normally distributed" implicitly means that s can take on any value.
Martina el 2 de Oct. de 2022
I know, right... that through me off as well

Iniciar sesión para comentar.

Walter Roberson el 2 de Oct. de 2022
You can round(x, -1) to round to the nearest multiple of 10.
However, Normal Distribution is inherently a continuous distribution, and it is contradictory to have "normally distributed" quantized values (other than quantized due to the limits of precision of the calculation method)
##### 1 comentarioMostrar -1 comentarios más antiguosOcultar -1 comentarios más antiguos
Martina el 2 de Oct. de 2022
Thank you!

Iniciar sesión para comentar.

### 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