P 1.2-5 The total charge q(t), in coulombs, that enters the terminal of an element is:

 

q is in coulombs when t is in seconds

 

Find the current i(t) and sketch its waveform for t ≥ 0.

 

For t < 0, q(t) = 0, therefore i(t) = 0 for t < 0.

 

For 

 

For  t > 2

 

i is in amperes when t is in seconds.

 

MATLAB Plots and Code follows:

 

 

 

%Program to plot out Current vs time for Homework Problem 1.2-5.

%Version 2018-12-21 DW Donovan

 

clear all;

ta = [-1:0.01:0]';

tb = [0:0.01:2]';

tc = [2:0.001:6]';

x = [ta' tb' tc'];

 

ia = 0*ta;

ib = 2*tb./tb;

ic = -2*exp(-2*(tc-2));

y = [ia' ib' ic'];

 

tt1 = 'PH 320 Homework Problem 1.2-5';

tt2 = 'Current vs Time for a given circuit element';

ttn = 'D.W. Donovan -- ';

tnl = '\newline';

ttf = [tt1 tnl tt2 tnl ttn date];

xl = 'Time, t, (seconds)';

yl = 'Current, i, (Amps)';

 

sp = 1;

axxmin = min(x)-sp;

axxmax = max(x) + sp;

axymin = min(y) - sp;

axymax = max(y) + sp;

 

figure

hold on

plot(ta, ia,'k-','LineWidth',5)

plot(tb, ib,'k-','LineWidth',5)

plot(tc, ic,'k-','LineWidth',5)

title (ttf,'FontSize', 16)

xlabel(xl, 'FontSize', 16)

ylabel(yl, 'FontSize', 16)

axis([axxmin axxmax axymin axymax])

 

 

 

 

 

 

 

Please send any comments or questions about this page to ddonovan@nmu.edu

This page last updated on December 21, 2018