Debugging an exponential decay expression

Mark Yourself Question

  1. Grab a piece of paper and try this problem yourself.
  2. When you're done, check the "I have answered this question" box below.
  3. View the solution and report whether you got it right or wrong.

The voltage across a discharging capacitor is


V=V0 e−t/(RC)V = V_0\, e^{-t/(RC)}


with V0=12 VV_0 = 12\ \text{V}, t=3 mst = 3\ \text{ms}, R=2.2 kΩR = 2.2\ \text{k}\Omega and C=1 μFC = 1\ \mu\text{F}. A student types


MATLAB
V = 12*exp(-0.003/2.2e3*1e-6)


and MATLAB displays V = 12.0000.


a) Explain, operation by operation, what MATLAB computed inside exp, and why the display shows 12.0000.


b) Write a corrected MATLAB line and give VV in volts to three significant figures.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Introduction to MATLAB Software Questions: