I have this function $$ \frac{di}{dt} = - \frac{R}{L} i $$
I know the solution which is $$ i(t) = i_{0} e^{- \frac{R}{L} (t-t_{0})} $$ I would like to get the same solution by using Matlab. How can I do that?
Edit:
The solution is
>> syms L R i
>> dsolve('Di = -R/L*i', 'i(t0) = i0')
Following codes should work, see