MATLAB: How to generate sine wave in Simulink by using the MATLAB function

matlab functionsine wave

I want to generate sine wave in Simulink by using the MATLAB function. I could not get the actual sinewave. And could not find the problem also, Please see the picture attached below to get a clear picture of my problem. And the code I used for MATLAB function works fine in MATLAB.

Best Answer

You could just use the sine wave block ?
If you really want to use a matlab function, you need to do :
here, the Matlab function generates the exact same sine as the sine wave block.