I added some values to the R,L and C parameters and provided a boolean input to the switch. This is what I get:
where k is True or False.
I forgot to draw diodes in my original circuit. Could you help me to see it again?