In MATLAB data is in discrete form, to realize the process of sampling and interpolation (i.e. ADC and DAC respectively), one can make use of downsampling and upsampling process.
Initially generate the signal at higher rate, which may resemble to continuous time signal. Downsample/decimate to the required rate for processing, which is sampling process.
Similarly when DAC is to be done, upsample/interpolate to higher rate required from the existing rate.