Arduino due and simulink (new to arduino)

Hello there!

I am new to arduino so any help will be highly appreciated!

I want to implement sinusoidal PWM with slight modification (please see the attached simulink snap) . The modification is that the amplitude of the sine wave is dependent on the frequency of the sine wave. A friend told me that I can directly convert my simulink model into arduino code using Matlab 2015 or above. But another friend told me that arduino due will not be able to run a program in which the amplitude of the sine wave is to be changed as a function of the frequency of the wave. Please let me know if it can be done using simulink programming of arduino due.

Thank you!