You are on page 1of 7

ENED 1091: Homework #1

Due: Week of February 2nd at beginning of Recitation


Problem 1: Arithmetic Operations with Arrays
Determine whether or not the following matrix operations are allowable or not. If the operation
is not allowable, indicate this. Otherwise, provide the result. Do these by hand.

(a)

4 8 1 5 2 6
+
2 a 3
b 7 1

][

(b)

][

(c)

[ ]

(d)

[ ][ ]

(e)

4 8 1 5 2 6
2 a 3
b 7 1

1
[ 4 5 3 ]
2

5
2
3 6
0
0

9
6
5
2+ b a+7 4

1
10 7
2b a7 2

4
5
3
8 10 6

Not allowable

][

2 0
4 0

3 5
5 3

x
y

8
0
2 x
37 15 3 x+ 5 y

Problem 2: Solving Systems of Linear Equations using Matrices


Write each of the following systems of equations in matrix form: Ax = b. Then determine
whether or not each of the following systems of linear equations has a unique solution. If there
is a unique solution, find it. Include all MATLAB commands.
(a)

r +2 s +3 t=1

2 r +6 s+2 t=1
10 s+ 8 t=3

Matrix Equation:

1
2 3
2 6 2
0 10 8

] [] [ ]
r
s
t

1
1
3

Unique Solution?

A=[1,2,3;-2,6,2;0,10,8];
b=[1;-1;3];
det(A)

ans=0
No Unique Solution
(b)

qr +2 s +3 t=1
2 q+ 4 r + 6 s+ 2t=1

7 q3 r +4 s+ 4 t=2
3 q5 s+ 10t =2

Matrix Equation:
1 1 2
2 4
6
7 3 4
3
0 5

3
2
4
10

] [] [ ]
q
r
s
t

1
1
2
2

Unique Solution?
Yes
q=0.0085, r=-0.3627, s=0.0104, t=0.2027
A=[1,-1,2,3;-2,4,6,2;7,-3,4,4;3,0,-5,10];
b=[1;-1;2;2];
det(A)
inv(A)*b

det(A)=-1056
inv(A)*b=
0.0085
-0.3627
0.0104
0.2027
Problem 3: Resultant Force
Consider the following three forces:

F1=1050 o N ; F2 =25 160 o N ; F 3=60 120 o N

(a) Resolve each force into an x-component and y-component. Fill in the table below. Show
your work!

F1x=10*cosd(50) F1y=10*sind(50)

F2x=25*cosd(160)

F2y=25*sind(70)

F1x=6.4279 N

F2x=-23.4923 N

F2y=8.5505 N

F1y=7.6604 N

F3x=60*cosd(-120)

F3y=60*sind(-120)

F3x=-30 N

F3y=-51.9615 N

Force
F1
F2
F3

x-component
6.428 N
-23.4923 N
-30 N

y-component
7.660 N
8.5505 N
-51.9615 N

(b) Calculate the resultant force in rectangular form and polar form. Show your work and
include units in your answers!
Rectangular
Fx=6.428-23.4923-30

Fy=7.660+8.5505-51.962

Fx=-47.0644 N

Fy=-35.7506 N

Polar
r=sqrt((-47.0644)^2 + (-35.7506)^2)
r=59.1030 N
theta=arctan(-35.7506/-47.0644)
theta=37.2207 +180
theta=217.2207

Resultant Force (Rectangular Form):

Fx = __-47.0644 N______

Fy = ___-35.7506 N_____

o
Resultant Force (Polar Form): _____59.1030 217.2207 N

____________________________

(c) Plot the three individual forces and the resultant force in MATLAB (all on the same plot).
Paste your plot and your MATLAB commands in the space below.
Force Diagram
Force 1
Force 2
Force 3
Resultant

50
40
30

y-component

20
10
0
-10
-20
-30
-40
-50
-50

-40

-30

-20

-10
0
10
x-component

20

30

40

50

F1=[10*cosd(50), 10*sind(50)];
F2=[25*cosd(160), 25*sind(160)];
F3=[60*cosd(-120), 60*sind(-120)];
R=[(F1(1)+F2(1)+F3(1)), (F1(2)+F2(2)+F3(2))];
plot([0 F1(1)],[0 F1(2)],'r-o',[0 F2(1)],[0 F2(2)],'k-o',[0 F3(1)],[0
F3(2)],'g-o',[0 R(1)],[0 R(2)],'b-o','LineWidth',4)
xlim([R(1)-5 -R(1)+5]); ylim([F3(2)-5 -F3(2)+5])
grid; xlabel('x-component'); ylabel('y-component'); title('Force Diagram')
legend('Force 1','Force 2','Force 3','Resultant')

Problem 4: Statics
Write the force balance equations for the diagram shown below that represents an object hanging
from two wires. Then write the equations in matrix form (Ax = b) and use MATLAB to solve for
the tension (T1 and T2) in the two wires. Show your work and include units in your answers!

T1

20o

T2
52o

W = 35 lbs

-T1x+T2x=0

1 =90+20=110o

2 =90-58=32o

T1y+T2y-35=0

T1cos(110o) + T2cos(32o)=0
T1sin(110o) + T2sin(32o) - 35=0
A=[cosd(110) cosd(32);sind(110) sind(32)];
b=[0; 35];
inv(A)*b

T1=30.3448 110o lbs


T2=12.3281 32o lbs

Problem 5: Mesh Analysis


A student in a circuits class writes mesh equations for the circuit shown below and now must
solve for the unknown currents (I1, I2, I3, and I4).

4.7 I 1+3.6 ( I 1I 2 ) +1( I 1I 3)=0


3.6 ( I 2I 1 ) +2 I 2+1.1 ( I 2I 4 )=12
1 ( I 3I 1 ) + 4.7 ( I 3I 4 ) +8.1 I 3=9
4.7 ( I 4 I 3 ) +1.1 ( I 4 I 2 ) +2.2 I 4=0

(a) Write the equations in matrix form and use MATLAB to solve for all four currents. The units
for the currents will be in milliamps (mA). Show all of your MATLAB commands and
results.
A=[(4.7+3.6+1),-3.6,-1,0;-3.6,(3.6+2+1.1),0,-1.1;-1,0,(1+4.7+8.1),-4.7;0,1.1,-4.7,(4.7+1.1+2.2)];
b=[0;-12;9;0];
inv(A)*b

ans =
-0.7872
-2.2045
0.6149
0.0582
I1=-0.7872 mA

I2=-2.2045 mA

I3=0.6149 mA

I4=0.0582 mA

(b) Find the current through the 3.6 k resistor and find the voltage drop across the 3.6 k
resistor. Show your calculations and include units in your answers.

Current through 3.6 k resistor:

2.2045 mA = 0.7872 mA + Current


Current = 1.4173 mA

Voltage drop

1.4173 mA * 3.6 k = 5.1023 V