How to add 5% random Noise to the dataset in MATLAB
31 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello Everyone, I hope you are doing well.
I have the dataset attached below. i want to add 5% random Noise to the dataset. How can i do that in matlab
Any help appreciated :)
2 comentarios
Jan
el 26 de Feb. de 2022
5% of what? Giving a percentage is a realtive expression. Then you have to define to which value this relation belongs to: 5% of maximum absolute value of the signal, 5% of each current value, 5% standard-deviation of the signal, 5% of the range, ...?
The actual data do not matters, but the definition of what you want to do is important.
Respuestas (1)
Image Analyst
el 27 de Feb. de 2022
Did you try
s = load('datasetvalue.mat')
dataset = s.dataset;
[rows, columns] = size(dataset)
noise = 0.1 * dataset .* (rand(rows, columns) - 0.5);
noisyData = dataset + noise;
13 comentarios
Image Analyst
el 1 de Mzo. de 2022
Yes, here is your data. It is not uniform. What is your definition of uniform?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/911090/image.png)
You can make uniformly distributed data with rand, but if you're varying the mean value depending on another value (the pixel value in your data) then it's no longer uniform. You would have to have the mean and stardard deviation of the noise be not dependent on your signal values.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!