Engineering 43. Chp 2 Tutorial Problem 2-24 Solution. Bruce Mayer, PE Registered Electrical & Mechanical Engineer [email protected]. Amplifier Driving Speaker. Consider an Amplifier Circuit connected to a Speaker. Speaker a.k.a. the “LOAD”. Driving Circuit a.k.a. the “SOURCE”. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Bruce Mayer, PE ENGR/MTH/PHYS25: Computational Methods
MATLAB Game PlanMATLAB Game Plan
Concept Test ALL possible Resistor Combinations then Check for Best
Because we have a small number of allowable values for RS and RL, the most direct way to choose RL is to compute the values of r for each combination of RS and RL. • Since there are four possible values of RS
and five values of RL, there are 4(5) = 20 combinations.
Bruce Mayer, PE ENGR/MTH/PHYS25: Computational Methods
MATLAB Plan (2)MATLAB Plan (2)
We can use an array operation in MATLAB to compute r for each of these combinations by defining two 5 × 4 2D-Arrays R_L and R_S. • The five rows of R_L contain the five
values of RL, and its four columns are identical.
• The four columns of R_S contain the four values of RS, and its five rows are identical.
Bruce Mayer, PE ENGR/MTH/PHYS25: Computational Methods
Th
e MA
TL
AB
Co
de
Th
e MA
TL
AB
Co
de
% Bruce Mayer, PE% ENGR22 * 20Jan07 * Rev. 13Sep08% Prob 2.24 * file Demo_Prob2_24_0809.m%% Since all COLUMNS in RL are the same, Define one Col and Replicate in Row Vector% Define RL cola = [10;15;20;25;30];% Make Array R_L by using a in 4-element Row VectorR_L = [a,a,a,a]%% Since all ROWS in RS are the same, Define one Row and Replicate in Col Vector% Define RS rowb = [10,15,20,25];% Make Array R_S by using a in 5-element Col VectorR_S=[b;b;b;b;b]%% Use Element-by-Element Operations to Calc r%% First Sum RS & RL for the 20 combosRsum = R_S+R_L%% Now sq the 20 sumsRsumSq = Rsum.^2 % need "dot" as this is element-by-element%% Finally Divide RL by SQd sumsr = R_L./RsumSq%% Use the max(A) command to find the max value in each COL, and the ROW in in Which the max Values Occurs[max_ratio, row] = max(r)