140
Practical MATLAB
® Applications for Engineers
Example 2.3
Create the script fi le parallel that returns the equivalent resistance R eq across terminals
AB of the circuit shown in Figure 2.39, where R 1 = 10 Ω, R 2 = 10 Ω, R 3 = 20 Ω, R 4 = 30 Ω,
and R 5 = 50 Ω.
MATLAB Solution
% Script file: parallel
Resist = [10 10 20 30 50];
ones =[1 1 1 1 1];
Re = ones./Resist
disp(‘***************************************************’)
disp(‘The admittances (in sie.) are=’);disp(Re)
Res = sum(Re);
Req = 1/Res;
disp (‘The equivalent resistance is given by:’); disp(Req)
disp(‘
Ohms
’)
disp(‘***************************************************’)
>> parallel
*********************************************************
The admittances (in sie.) are =
Re =
0.1000
0.1000
0.0500 0.0333 0.0200
The equivalent resistance is given by:
3.29670329670330 Ohms
*********************************************************
Example 2.4
Color coding is used to specify the resistance values (in ohms) as well as its statistical
performance (tolerance and reliability).
The color code of a resistor consists of fi ve color bands, as shown in Figure 2.40, where
the fi rst three color bands are used to specify the resistance value and the remaining
two bands are used to specify their statistical performance.
Each color band represents a numerical value defi ned in Table 2.2.
FIGURE 2.39
Parallel connection of R 1 , R 2 , R 3 , R 4 , and R 5 of Example 2.3.
R 1 = 10 Ω R 2 = 10 Ω R 3 = 20 Ω R 4 = 30 Ω
R 5 = 50 Ω
A
B
CRC_47760_CH002.indd 140
CRC_47760_CH002.indd 140
7/23/2008 1:38:45 PM
7/23/2008 1:38:45 PM
Précédent

- 151/708

Suivant