How to add 10% normally distributed random error to the data?
Show older comments
I have a data set with dimension (11000,26). How to add 10% normally distributed random error to the data?
Answers (1)
KSSV
on 7 Jul 2021
Let A be your data.
[m,n] = size(A) ;
idx = randperm(m*n,round(m*n*10/100)) ;
A(idx) = randn(size(idx)) ;
Categories
Find more on Random Number Generation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!