1. Engineering
  2. Computer Science
  3. write an mfile that will plot an exponential plot of...

Question: write an mfile that will plot an exponential plot of...

Question details

Write an M-file that will plot an exponential plot of the voltage discharge in a capacitor. There should be two inputs to the program (these will be input from the command window and read into the program). These inputs will be the initial voltage Vi, and the time constant, tau. The program will then be a smooth plot of this voltage decay for 5 time constants (calculated in the program).

The voltage decay is given by: V(t) = Vi e^(-t/tau) Don’t forget to label the plot appropriately.

Run your program with initial voltage of 25 volts, and a time constant, tau, of 5 seconds.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution