Hi Tarek,
I understand that you want to add white noise to your model.
The ‘awgn’ function in the Communications Toolbox can be used to add White Gaussian Noise to the signal. A parameter ‘snr’ is passed with the signal, and it is used to decide the relative power of the noise with respect to your signal. Unit of ‘snr’ is decibel.
Add the below line in your code before you calculate ‘y’ to add noise to ‘x’.
x_noisy = awgn(x, snr, ‘measured’);
Another choice is to generate noise samples using ‘wgn’ function and adding to ‘x’.
Refer the below documentation for details on the ‘awgn’ and ‘wgn’ functions:
Hope this answer helps.