E1. 34 R1 10kr 1кл R3 E2 w R4 R2 2 кл "415kn B29V 1.5V E3

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter6: System Integration And Performance
Section: Chapter Questions
Problem 2PE
icon
Related questions
Question

I need fixing my a matlab code to find the currents USING MARTIXS AND INVERSE to find the current

% At this point We Enter the Resistor values and Voltage Source Values

fprintf('Provide Resistance Values for the Resistors as Requested: \n');

fprintf('===============================================\n');

R1x = input('Enter the value for R1 in kohms: ');

R2x = input('Enter the value for R2 in kohms: ');

R3x = input('Enter the value for R3 in kohms: ');

R4x = input('Enter the value for R4 in kohms: ');

fprintf('Provide voltage values for as requested: \n');

fprintf('===============================================\n');

E1 = input('Enter the value of E1 in Volts: ');

E2 = input('Enter the value of E2 in Volts: ');

E3 = input('Enter the value of E3 in Volts: ');

fprintf('===============================================\n');

% Scaling FACTOR multiplication of resistors by 1000 (1K) each

R1 = 1000 * R1x;

R2 = 1000 * R2x;

R3 = 1000 * R3x;

R4 = 1000 * R4x;

fprintf('VALUES YOU HAVE ENTERED FOR YOUR CIRCUIT: \n');

fprintf('****************************************************\n');

fprintf('R1 = %4.2f KOhms\n', R1x);

fprintf('R2 = %4.2f KOhms\n', R2x);

fprintf('R3 = %4.2f KOhms\n', R3x);

fprintf('R4 = %4.2f KOhms\n', R4x);

fprintf('E1 = %4.2f Volts\n', E1);

fprintf('E2 = %4.2f Volts\n', E2);

fprintf('E3 = %4.2f Volts\n', E3);

% Matrix Creation Step

R11 = R1 + R2;

R22 = R2 + R3 + R4;

R33 = R4;

A = [R11 -R2 0; -R2 R22 -R4; 0 -R4 R33];

b = [(E1 - E2) E2 E3]';

% COMPUTATION SECTION

% Current Calculation

I = inv(A)*b;

% Reassignment of Currents to a more meaningul form

I1 = I(1);

I2 = I(2);

IR3 = (I1 - I2);

IR4 = I(3);

% OUTPUT SECTION

fprintf('****                  OUPUT RESULTS              ****\n');

fprintf('*****************************************************\n');

fprintf('********   CURRENTS: *********\n');

fprintf('I1 = %4.3f mAmps\n', I1*1000);

fprintf('I2 = %4.3f mAmps\n', I2*1000);

fprintf('IR3 = %4.3f mAmps\n', IR3*1000);

fprintf('IR4 = %4.3f mAmps\n', IR4*1000);

 

E1.
34
R1
10kr
1кл
R3
E2
w
R4
R2
2 кл
"415kn
B29V
1.5V
E3
Transcribed Image Text:E1. 34 R1 10kr 1кл R3 E2 w R4 R2 2 кл "415kn B29V 1.5V E3
Expert Solution
steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Fundamentals of Information Systems
Fundamentals of Information Systems
Computer Science
ISBN:
9781337097536
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
MIS
MIS
Computer Science
ISBN:
9781337681919
Author:
BIDGOLI
Publisher:
Cengage
Enhanced Discovering Computers 2017 (Shelly Cashm…
Enhanced Discovering Computers 2017 (Shelly Cashm…
Computer Science
ISBN:
9781305657458
Author:
Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:
Cengage Learning
Principles of Information Systems (MindTap Course…
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning