Hello !
Current expression is not simply votage*t/L, it is actually intigration of voltage/L with respect to time. Derive proper current equations in time domain and apply the same for loop, you will see the results you want to see.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!