(a) Define an anonymous function answerE that returns i(t) given input t.
(b) The final value for the current is 2 amps. Find a time tm when the
current is at least 99% of the nal value but strictly less than 2. Store
this value in the variable answerF.
(c) Create a vector in answerG using linspace with ten evenly spaced
elements where 0 as the first element and tm as the last element.
(d) Create a vector in answerH which contains the current at each time in
a) To define an anonymous function answerE that returns i(t) given input t run the command:
answerE=@(t)(V/R[/url])*( 1-exp(-(R*t/L)) );
b) We have that the final value for the current is 2 amps. This means that V/R = 2. In order to find tm we need to know the value of R/L. In other words we should give some values for V, R, L.
So set some values and then redefine the function: