%Put here the path where you have put the Matlab codes, for example:
addpath('C:\Matlab')
%Author: Aurore Delaigle
%This code illustrates how to use the functions for computing the deconvolution kernel density estimator and its bandwidths
%Noise to signal ratio=varU/varX
NSR=0.2
%Sample size
n=500
%Generate data from a normal mixture
X=normrnd(5,.4,1,n);
X2=normrnd(2,1,n);
pmix=0.75;
tmp=unifrnd(0,1,1,n);
X(tmp