Hello,
I have attached a basic working PLECS Standalone example that you can reference and modify for different timing, magnitudes, frequency, etc.
The logic uses a pulse generator to enable a subsystem every 100ms. The input to the enabled subsystem is a repeating linear ramp signal from 1 to 0 every 100ms, but by using the enabled subsystem we can effectively only select every 4th ramp iteration, such that it actually repeats every 400ms. This repeating (and delayed) ramp signal is then multiplied by the sinusoid and the negative slope of the ramp causes an attenuation behavior.
To open this model in PLECS Blockset, add an empty PLECS Circuit block in a Simulink model and from the File menu, choose "Import from Standalone".
Please study this implementation and then let me know if you have questions.
Regards,
Kris