It depends on what ‘color’ you want the noise to have. There are several ways to do it.
To create ‘1/f’ noise for example, this works:
fv = linspace(0, 1, 20);
a = 1./(1 + fv*2);
b = firls(42, fv, a);
figure(1)
freqz(b, 1, 2^17)
N = 1E+6;
ns = randn(1, N);
invfn = filtfilt(b, 1, ns);
figure(2)
plot([0:N-1], invfn)
grid
FTn = fft(invfn-mean(invfn))/N;
figure(3)
plot([0:N/2], abs(FTn(1:N/2+1))*2)
grid
See the documentation on the firls (link) function for details on how to use the function to shape the noise spectrum to meet your requirements.
Best Answer