The “hNRDownlinkWaveformGenerator” is a helper function that was introduced in the 5G toolbox that is available in all releases starting from MATLAB 2018b. It is used in the “hNRDownlinkWaveformGeneratorExample” for complex baseband waveform generation, as mentioned.
Access the documentation link here for MATLAB R2019a or here for MATLAB R2018b and click on “Try it in MATLAB”, and execute the command provided in the command window of MATLAB. This will open the example if the 5G toolbox is installed properly. In case the problem persists, try reinstalling the toolbox.
In case of MATLAB 2018a, the helper function is unavailable, therefore will not work, even with the LTE 5G library installed.