Question
MATLAB
2. Consider the following set of seven equations from a loop mesh circuit, with I representing current. Define a symbolic var
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Code:

clc
clear

syms I1 I2 I3 I4 I5 I6 I7
eqns = [3*I1 + 4*I2 + 2*I3 - I4 + I5 + 7*I6 + I7 == 42,
2*I1 - 2*I2 + 3*I3 - 4*I4 + 5*I5 + 2*I6 + 8*I7 == 32,
I1 + 2*I2 + 3*I3 + I4 + 2*I5 + 4*I6 + 67 == 12,
5*I1 + 10*I2 + 4*I3 + 3*I4 + 9*I5 - 2*I6 + I7 == -5,
3*I1 + 2*I2 - 2*I3 - 4*I4 - 5*I5 - 6*I6 + 7*I7 == 10,
-2*I1 + 9*I2 + I3 + 3*I4 - 3*I5 + 5*I6 + I7 == 18,
I1 - 2*I2 - 8*I3 + 4*I4 + 2*I5 + 4*I6 + 5*I7 == 17];
[A,b] = equationsToMatrix(eqns);
I_VEC = A\b;
disp('Currents:');
I = eval(I_VEC);
disp("I1: "+num2str(I(1)));
disp("I2: "+num2str(I(2)));
disp("I3: "+num2str(I(3)));
disp("I4: "+num2str(I(4)));
disp("I5: "+num2str(I(5)));
disp("I6: "+num2str(I(6)));
disp("I7: "+num2str(I(7)));

Output:

Currents:
I1: -21.6759
I2: 19.4411
I3: -29.5797
I4: -42.7739
I5: 19.472
I6: 5.0906
I7: -9.458
>>

Add a comment
Know the answer?
Add Answer to:
MATLAB 2. Consider the following set of seven equations from a loop mesh circuit, with I...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Create a program that will use the attached input file and perform the following operations. Read...

    Create a program that will use the attached input file and perform the following operations. Read the file into an appropriate JCF data structure. Look up a (list of) names and numbers matching a last name or the first letters of a last name, ignoring case. Look up a (list of) names and numbers matching a number or the first digits of a number. Add a name and number to the list. Sort the list by first name, last name...

  • In C++ Programming: Using a single for loop, output the even numbers between 2 and 1004...

    In C++ Programming: Using a single for loop, output the even numbers between 2 and 1004 (inclusive) that iterates (loops) exactly 502 times. The outputted numbers be aligned in a table with 10 numbers per row. Each column in the table should be 5 characters wide. Do not nest a loop inside of another loop. Hint: First create and test the code that output the numbers all on one line (the command line will automatically wrap the output to new...

  • Hi it's python I imported a data which are so many words in txt and I arranged and reshaped with ...

    Hi it's python I imported a data which are so many words in txt and I arranged and reshaped with alphabetically both rows and columns I was successful with these steps but I am stuck with next step below is my code and screenshot import numpy as np import pandas as pd data=pd.read_csv("/Users/superman/Downloads/words_file2.txt",header=None) df_input=pd.DataFrame(data) df_output=pd.DataFrame(np.arange(676).reshape((26,26)), index = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'], columns = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']) df_output.index.name="Start" df_output.columns.name="End" df_output This below screen shot is what I have to find I have to find each word...

  • need help to complete this java program // add appropriate import statements here. // These imports...

    need help to complete this java program // add appropriate import statements here. // These imports you can leave as is. import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.canvas.Canvas; import javafx.scene.canvas.GraphicsContext; import javafx.scene.paint.Color; import javafx.stage.Stage; /** @author yourAccountNameHere */ public class ConnectTheDots extends Application {            /*     * Do not add code to main(). Add it below in connectTheDots instead.     */     public static void main(String[] args) {         launch(args);     }         /*...

  • I just need help getting my unadjusted trial balance The following transactions occurred during the month...

    I just need help getting my unadjusted trial balance The following transactions occurred during the month of December 2010 12/1 We Mess U You, Inc. rents is salon space as part of a local mal We Mess U Up prepays its rent 12 months in advance. Annual rental payment is made on December 1 of each year and expires on December 1 of the following year. The rental payment is made on this date for the 12 months ending December...

  • The Language Is SQL The language is SQL 13- List full details of agents with first...

    The Language Is SQL The language is SQL 13- List full details of agents with first names having exactly three or four letters sorted by the state attribute. 14- List the first name, the last name, the address, the city, the state, the branch number, and the email of agents working in the branch 8005 and having email addresses from yahoo.com. 15-List the first name, the last name, the address, the city, the state, the branch number, and the email...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT