222
Practical MATLAB
® Applications for Engineers
disconnecting the source. Obtain expressions for the transient voltage across C 1 ,
the current i L (t), and their respective time plots.
P.2.43 Steady-state conditions exist for t ≤ 0 in the circuit of Figure 2.135 (while the voltage source is connected to the circuit). At t = 0
+
, the switch SW 1 which connects the
voltage source opens, while the switch SW 2 closes. Obtain expressions for v C (t) and
i L (t), and their respective time plots for t ≥ 0.
P.2.44 Write a function fi le that returns the length L of a circular conductor with diameter
d in meters (recall that R = ρ L/A), given R (ohms), ρ, and d.
P.2.45 Create a function fi le that returns the capacitance C (in Farads) and the strength of
its electric fi eld, given the area of the plates of the capacitor (in meters squared), the
distance d between the plates (in meters), as well as the dielectric material of C.
P.2.46 Modify problem P.2.44 for the case when d is given in inches and L in foot.
P.2.47 Create a function fi le that returns a table and a plot of R versus d for a copper wire,
where the diameter d varies over the range 0.01 in. ≤ d ≤ 0.2 in. in steps (increments) of 0.02 in.
P.2.48 Convert the program of Example 2.4 (color code) into a function fi le.
P.2.49 Write a function fi le that requests the number and values of a set of resistors connected in series and outputs its equivalent resistance.
P.2.50 Repeat problem P.2.50 for the parallel case.
P.2.51 Write a function fi le that requests the value of R and n, and returns the series connections of the set of resistors with the following values:
R, 2R, 3R, …, (n − 1)R, nR
P.2.52 Repeat problem P.2.52 for the parallel case.
P.2.53 Write a function fi le that returns the Y connection, given the ∆.
P.2.54 Repeat problem P.2.55 for the ∆-Y transformation.
P.2.55 Develop a general function fi le that solves the set of n independent (loop or node)
equations, for 2 ≤ n ≤ 10.
FIGURE 2.135
Network of P.2.43.
V = 16 V
+
−
C = 1/18 F
R = 4 Ω
= 2 H
Switch opens at t = 0
Switch closes at t = 0
SW 1
SW 2
CRC_47760_CH002.indd 222
CRC_47760_CH002.indd 222
7/23/2008 1:39:06 PM
7/23/2008 1:39:06 PM
Practical MATLAB
® Applications for Engineers
disconnecting the source. Obtain expressions for the transient voltage across C 1 ,
the current i L (t), and their respective time plots.
P.2.43 Steady-state conditions exist for t ≤ 0 in the circuit of Figure 2.135 (while the voltage source is connected to the circuit). At t = 0
+
, the switch SW 1 which connects the
voltage source opens, while the switch SW 2 closes. Obtain expressions for v C (t) and
i L (t), and their respective time plots for t ≥ 0.
P.2.44 Write a function fi le that returns the length L of a circular conductor with diameter
d in meters (recall that R = ρ L/A), given R (ohms), ρ, and d.
P.2.45 Create a function fi le that returns the capacitance C (in Farads) and the strength of
its electric fi eld, given the area of the plates of the capacitor (in meters squared), the
distance d between the plates (in meters), as well as the dielectric material of C.
P.2.46 Modify problem P.2.44 for the case when d is given in inches and L in foot.
P.2.47 Create a function fi le that returns a table and a plot of R versus d for a copper wire,
where the diameter d varies over the range 0.01 in. ≤ d ≤ 0.2 in. in steps (increments) of 0.02 in.
P.2.48 Convert the program of Example 2.4 (color code) into a function fi le.
P.2.49 Write a function fi le that requests the number and values of a set of resistors connected in series and outputs its equivalent resistance.
P.2.50 Repeat problem P.2.50 for the parallel case.
P.2.51 Write a function fi le that requests the value of R and n, and returns the series connections of the set of resistors with the following values:
R, 2R, 3R, …, (n − 1)R, nR
P.2.52 Repeat problem P.2.52 for the parallel case.
P.2.53 Write a function fi le that returns the Y connection, given the ∆.
P.2.54 Repeat problem P.2.55 for the ∆-Y transformation.
P.2.55 Develop a general function fi le that solves the set of n independent (loop or node)
equations, for 2 ≤ n ≤ 10.
FIGURE 2.135
Network of P.2.43.
V = 16 V
+
−
C = 1/18 F
R = 4 Ω
= 2 H
Switch opens at t = 0
Switch closes at t = 0
SW 1
SW 2
CRC_47760_CH002.indd 222
CRC_47760_CH002.indd 222
7/23/2008 1:39:06 PM
7/23/2008 1:39:06 PM
