# Matlab RLC simulink and code help

In the circuit in the figure, the switch closes at time t = 0. What is the change of capacitor voltage and coil current in the range of 0-15 seconds? Show the solution in M. file and Simulink. Can you help me solve this question, please?

• I'm voting to close this question as off-topic because it's a homework problem with no effort shown. – Hearth Mar 26 at 17:09

$$\begin{cases} \text{I}\left(t\right)=\text{V}_\text{R}\left(t\right)\\ \\ \text{I}\left(t\right)=2\text{V}_\text{L}'\left(t\right)\\ \\ \text{I}'\left(t\right)=2\text{V}_\text{C}\left(t\right)\\ \\ 20=\text{V}_\text{R}\left(t\right)+\text{V}_\text{L}\left(t\right)+\text{V}_\text{C}\left(t\right)\\ \\ \text{I}\left(0\right)=0\\ \\ \text{V}_\text{C}\left(0\right)=4 \end{cases}\tag1$$