PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

152 Practical MATLAB® Applications for Engineers


ANALYTICAL Solution
Recall that
R
L
A
 (1 TC * ) ∆T

where ρ is the Greek letter rho, TC = 0.00393 (the temperature coeffi cient of copper), and
R = ρ(10 0/1)(1 + 0.00393 * ∆T).
MATLAB Solution
>> T = 0:10:100;
>> TC = 0.00393;
>> L =100;
>> Rho =10.37;
>> A=1;
>> R= (Rho*100./A)*(1+TC.*T);
>> result = [T’ R’];
>>disp(‘**********************************’)
>> disp(‘Temperature (°C)****Resistance (in Ohms)’);
>>disp(‘**********************************’)
>>disp(result)
>>disp(‘**********************************’)
*****************************************************
Temperature (°C)****Resistance (in Ohms)
*****************************************************
1.0e+003
0 1.0370
0.0100 1.0778
0.0200 1.1185
0.0300 1.1593
0.0400 1.2000
0.0500 1.2408
0.0600 1.2815
0.0700 1.3223
0.0800 1.3630
0.0900 1.4038
0.1000 1.4445
**************************************************

Example 2.12
Let the resistor RL shown in the circuit of Figure 2.50 vary over the range 0 Ω ≤ RL ≤ 10 Ω
in linear incremental steps of 0.25 Ω.
Write a program that returns the following plots:


  1. IL versus RL

  2. VL versus RL

  3. [PRL = VL * IL] versus RL
    For each of the plots, determine the maximum of IL , V 2 , and PRL over the range


0 Ω ≤ RL ≤ 10 Ω, and verify that PRL-max ≠ IL-max (^) VL-max and PRL-max < IL-max (^) VL-max.
MATLAB Solution




VS =10;
RL = 0:0.25:10;
IL = VS./(5+RL);
VL = IL.*RL;
subplot (2,2,1)



Free download pdf