10% random noise to an array of values

7 visualizaciones (últimos 30 días)
Dylan Smith
Dylan Smith el 2 de Abr. de 2018
Comentada: Muhammad Tauha Ali el 30 de Ag. de 2021
How do I add 10 % random noise to freq = 1:40e3

Respuestas (1)

William Smith
William Smith el 3 de Abr. de 2018
Not totally clear what you want, but let's assume
  • you want each element in Frequency (40k elements) to be changed to somewhere between 90% and 110% of it's current value.
  • you want a uniform distribution, not say normally distributed noise.
Then:
multiplier = 0.9 + rand(size(freq)) * 0.2;
answer = freq .* multiplier;

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by