How to add 10% normally distributed random error to the data?

I have a data set with dimension (11000,26). How to add 10% normally distributed random error to the data?

Answers (1)

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

Asked:

on 7 Jul 2021

Answered:

on 7 Jul 2021

Community Treasure Hunt

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

Start Hunting!