How to add 5% random Noise to the dataset in MATLAB
24 次查看(过去 30 天)
显示 更早的评论
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 个评论
Jan
2022-2-26
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.
回答(1 个)
Image Analyst
2022-2-27
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 个评论
Image Analyst
2022-3-1
Yes, here is your data. It is not uniform. What is your definition of uniform?

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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!