Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

M2

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

Exercises

1.) Evaluate the following expression


a.) (0.0000123+5.67.*10.^-3).*0.4567.*10.^-4
Answer: 2.5951e-07
Syntax: >>(0.0000123+5.67.*10.^-3).*0.4567.*10.^-4

b.) √ 2 π /5
Answer: 0.8886
Syntax: (sqrt(2).*pi)./5

V swing
c.) V IL=V ref + φT cosh
( 2 φT )
−1 Answer: 3.5868

Syntax: >> syms x y;


>> x = (1.75./(2.*0.35))-1;
>> y = 3.25+0.35.*acosh(x)

2.) Define the ffg matrice:

x=

1 1 3 2

-4 -3 -2 -1

11 7 3 -1

4 2 0 -2

y=

1 3 9 -1

-5 -3 -1 1

2 3 4 5

-1 2 -3 4
z=

7 9 -1 6

1 0 -2 10

11 8 3 -1

5 6 7 8

Syntax: >>syms X Y Z;

>> X = [1 1 3 2;-4 -3 -2 -1;11 7 3 -2;4 2 0 -2]

>> Y = [1 3 9 -1;-5 -3 -1 1;2 3 4 5;-1 2 -3 4]

>> Z = [7 9 -1 6;1 0 -2 10; 11 8 3 -1; 5 6 7 8]

Determine the following matrices:

a.) Q = X + Y
Answer:

Q=

2 4 12 1
-9 -6 -3 0
13 10 7 3
3 4 -3 2

b.) S = X.*Z
Answer:

S=

7 9 -3 12
-4 0 4 -10
121 56 9 2
20 12 0 -16
c.) R = Z./Y
Answer:

R=

7.0000 3.0000 -0.1111 -6.0000

-0.2000 0 2.0000 10.0000

5.5000 2.6667 0.7500 -0.2000

-5.0000 3.0000 -2.3333 2.0000

d.) T = (X*Y).^2
Answer:

T=

0 169 196 529

64 121 1444 169

256 289 12100 9

16 4 1600 100

e.) U = all second column of [X, Y, Z, R]


Syntax: >> U = [X(:,2),Y(:,2),Z(:,2),R(:,2)]
Answer:

U=

1.0000 3.0000 9.0000 3.0000


-3.0000 -3.0000 0 0
7.0000 3.0000 8.0000 2.6667
2.0000 2.0000 6.0000 3.0000

f.) V = all third row of [Q;S;X;Z]


Syntax: V = [Q(3,:);S(3,:);X(3,:);Z(3,:)]
Answer:
V=

13 10 7 3

121 56 9 2

11 7 3 -2

11 8 3 -1

3.) The atmospheric pressure P at h miles above sea levels leads to the equation
In P – ln 14.7 ≈ -0.21h
What is the atmospheric pressure at 5 miles above the sea.

Answer: 5.1440849119339834524085579098018
Syntax: >> syms P;
>> P = vpasolve(log(P)-log(14.7)==-0.21*(5),P)

4.) Determine the roots of the system of equations:

4 x1 + x 2 +4 x 3=9
5 x 1−x 2+ x 3=12
−2 x1 +3 x 2+ 7 x2=5

Answer:

X1 = 1.7059

X2 = -1.5882

X3 = 1.8824

Syntax:

>> M = [4 1 2 9; 5 -1 1 12; -2 3 7 5]

>> rref([M])

You might also like