Akramul Haque , which version of MATLAB are you using? In MATLAB 2021 version there is block called 'Waveform Generator' which require signal magnitude, frequency in Hz and phase in radians. These parameters can be entered directly or can be passed through workspace. Make sure to select appropriate sample time for waveform generator.
Akramul Haque , Make sure you have DSP system toolbox and select appropriate sample time for waveform generator, solver and step time for solver. Hope it will fix your problem.