sm ch (8).pdf

February 11, 2017 | Author: Hector Naranjo | Category: N/A
Share Embed Donate


Short Description

Download sm ch (8).pdf...

Description

1

CHAPTER 8 8.1 >> Aug = [ A eye( eye( si ze( A) ) ]

Here’s an example session of how it can be employed. >> A = r and( 3) A = 0. 9501 9501 0. 2311 2311 0. 6068 6068

0. 4860 4860 0. 8913 8913 0. 7621 7621

0. 4565 4565 0. 0185 0185 0. 8214 8214

>> Aug = [ A eye( eye( si ze( A) ) ] Aug = 0. 9501 9501 0. 2311 2311 0. 6068 6068 8.2

0. 4860 4860 0. 8913 8913 0. 7621 7621

(a) [ A]: 3  2 [ E ]: ]: 3  3

0. 4565 4565 0. 0185 0185 0. 8214 8214

[ B]: 3  3 [F ]: ]: 2  3

1. 0000 0000 0 0

0 1. 0000 0000 0

{C }: }: 3  1 G: 1  3

0 0 1. 0000 0000

[ D]: 2  4

(b) square: [ B], [ E ]; ]; column: {C }, }, row: G (c) a12 = 5, b23 = 6, d 32 32 = undefined, e22 = 1,  f 12 12 = 0, g12 = 6 (d)

5 (1) [ E ]  [ B ]   8  6 3  (3) [ B]  [ E ]  6   2

8 13 

  0 10  2 1   1 3  0 2 3

9

(5) [C ]T    2 6 1

53 23 75   (7) [ B][ ] [ E ]  39 7 48   18 10 36

(9) [G][C ] = 56

 66 12 51 (11)  ET  [ E ]  12 26 33    51 33 81

(2) [ A] + [F ] = undefined

 28 21 49 (4) 7[ B]   7 14 42   14 0 28  21 13 61   (6) [ E ][ B]  35 23 67    28 12 52  5 4 T  (8) [ D]   3   7 4  (10)  I [ B ]  1   2

2

1



7



5 3 7

  0 4  2 6

(12) C T  [C ]  41

PROPRIETARY MATERIAL . © The McGraw-Hill Companies, Inc. All rights rights reserved. No part of this Manual

may be displayed, reproduced or distributed in any form or by any means, without the prior written permission of the  publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw-Hill for their individual course preparation. If you are a student using this Manual, you are using it without permission. permission.

2

8.3 The terms can be collected to give

 0 6 5   x1   50   0 2 7   x   30     2   4 3 7   x3   50  Here is the MATLAB session: >> A = [ 0 - 6 5; 0 2 7; - 4 3 - 7] ; >> b = [ 50; - 30; 50] ; >> x = A\ b x = - 17. 0192 - 9. 6154 - 1. 5385 >> AT = A' 0 0 -6 2 5 7

-4 3 -7

>> AI = i nv( A) AI = - 0. 1683 - 0. 1298 - 0. 1346 0. 0962 0. 0385 0. 1154

- 0. 2500 0 0

8.4 (a) Here are all the possible multiplications:

>> A=[ 6 - 1; 12 7; - 5 3] ; >> B=[ 4 0; 0. 6 8] ; >> C=[ 1 - 2; - 6 1] ; >> A* B ans = 23. 4000 - 8. 0000 52. 2000 56. 0000 - 18. 2000 24. 0000 >> A* C ans = 12 - 13 - 30 - 17 - 23 13 >> B* C ans = 4. 0000 - 8. 0000 - 47. 4000 6. 8000 >> C* B ans = 2. 8000 - 16. 0000 - 23. 4000 8. 0000 (b) [ B][ A] and [C ][ A] are impossible because the inner dimensions do not match:

(22) * (32) (c) According to (a), [ B][C ]  [C ][ B]

PROPRIETARY MATERIAL . © The McGraw-Hill Companies, Inc. All rights reserved. No part of this Manual

may be displayed, reproduced or distributed in any form or by any means, without the prior written permission of the  publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw-Hill for their individual course preparation. If you are a student using this Manual, you are using it without permission.

3

8.5 >> A=[ 3+2*i 4; - i 1] >> b=[ 2+i ; 3] >> z=A\ b

z = - 0. 5333 + 1. 4000i 1. 6000 - 0. 5333i 8.6 f unct i on X=mmul t ( Y, Z) % mmul t : mat r i x mul t i pl i cat i on % X=mmul t ( Y, Z) % mul t i pl i es t wo mat r i ces % i nput : % Y = f i rst mat r i x % Z = second mat r i x % out put : % X = pr oduct

i f nar gi n> A=[ 6 - 1; 12 7; - 5 3] ; >> B=[ 4 0; 0. 6 8] ; >> C=[ 1 - 2; - 6 1] ; >> mmul t ( A, B) ans = 23. 4000 - 8. 0000 52. 2000 56. 0000 - 18. 2000 24. 0000 >> mmul t ( A, C) ans = 12 - 13 - 30 - 17 - 23 13 >> mmul t ( B, C) ans = 4. 0000 - 8. 0000 - 47. 4000 6. 8000 >> mmul t ( C, B) ans = 2. 8000 - 16. 0000 - 23. 4000 8. 0000 >> mmul t ( B, A) PROPRIETARY MATERIAL . © The McGraw-Hill Companies, Inc. All rights reserved. No part of this Manual

may be displayed, reproduced or distributed in any form or by any means, without the prior written permission of the  publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw-Hill for their individual course preparation. If you are a student using this Manual, you are using it without permission.

4

?? ? Er r or usi ng ==> mmul t I nner mat r i x di mensi ons must agr ee. >> mmul t ( C, A) ?? ? Er r or usi ng ==> mmul t I nner mat r i x di mensi ons must agr ee. 8.7 f unct i on AT=mat r an( A) % mat r an: mat r i x t r anspose % AT=mt r an( A) % generat es t he t r anspose of a mat r i x % i nput : % A = or i gi nal mat r i x % out put : % AT = t r anspose

[ m, n] =si ze( A) ; f or i = 1: m f or j = 1: n AT( j , i ) = A( i , j ) ; end end

Test of function for cases from Prob. 8.4: >> mat r an( A) ans = 6 12 -1 7

-5 3

>> mat r an( B) 4. 0000 0

0. 6000 8. 0000

>> mat r an( C) ans = 1 -6 -2 1 8.8 f unct i on B = permut ( A, r 1, r 2) % permut : Swi t ch r ows of mat r i x A wi t h a permut at i on mat r i x % B = permut ( A, r 1, r 2) % i nput : % A = or i gi nal mat r i x % r 1, r 2 = r ows t o be swi t ched % out put : % B = mat r i x wi t h r ows s wi t ched

[ m, n] = si ze( A) ; i f m ~= n, er r or ( ' mat r i x not squar e' ) , end i f r 1 == r 2 | r 1>m | r 2>m err or( ' r ow numbers ar e equal or exceed mat r i x di mensi ons' ) end P = zeros( n) ; P( r 1, r2)=1; P( r 2, r 1) =1; f or i = 1: m i f i ~=r 1 & i ~=r 2 P( i , i ) =1; end PROPRIETARY MATERIAL . © The McGraw-Hill Companies, Inc. All rights reserved. No part of this Manual

may be displayed, reproduced or distributed in any form or by any means, without the prior written permission of the  publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw-Hill for their individual course preparation. If you are a student using this Manual, you are using it without permission.

5

end B=P* A;

Test script: cl c A=[ 1 2 3 4; 5 6 7 8; 9 10 11 12; 13 14 15 16] B = per mut ( A, 3, 1) B = per mut ( A, 3, 5) A = 1 5 9 13

2 6 10 14

3 7 11 15

4 8 12 16

9 5 1 13

10 6 2 14

11 7 3 15

12 8 4 16

B =

?? ? Er r or usi ng ==> per mut r ow number s ar e equal or exceed mat r i x di mensi ons Err or i n ==> per mut Scr i pt at 4 B = per mut ( A, 3, 5) 8.9 The mass balances can be written as

(Q15  Q12 )c1

 Q31c3

 Q01c01

 Q12 c1  (Q23  Q24  Q25 ) c2  Q23c2  (Q31  Q34 ) c3  Q24 c2  Q15 c1

 Q25 c2

 Q34 c3  Q44 c4

0  Q03c03  Q54c5  0  (Q54  Q55 ) c5  0

The parameters can be substituted and the result written in matrix form as

 9 0 3  4 4 0   0 2 9   0 1 6  5 1 0

0 0 0 9 0

0   c1 

120       0  c2   0  0  c3   350   2  c4   0      6   c5   0 

The following MATLAB script can then be used to solve for the concentrations cl c Q = [ 9 0 - 3 0 0; - 4 4 0 0 0; 0 - 2 9 0 0; 0 - 1 - 6 9 - 2; - 5 - 1 0 0 6] ; Qc = [ 120; 0; 350; 0; 0] ; c = Q\ Qc c = PROPRIETARY MATERIAL . © The McGraw-Hill Companies, Inc. All rights reserved. No part of this Manual

may be displayed, reproduced or distributed in any form or by any means, without the prior written permission of the  publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw-Hill for their individual course preparation. If you are a student using this Manual, you are using it without permission.

6

28. 4000 28. 4000 45. 2000 39. 6000 28. 4000 8.10 The problem can be written in matrix form as

0 0 0   F 1   0   0.5  0.866025 0    F     2000 0.5 0 0.866025 0 0 0   2     0.866025 1 0 1 0 0   F 3   0        0 0 0 1 0   H 2   0   0.5  0 1 0.5 0 0 0   V 2   0       0 0 0.866025 0 0  1   V 3   0   MATLAB can then be used to solve for the forces and reactions, cl c; f or mat shor t g A = [ 0. 866025 0 - 0. 5 0 0 0; 0. 5 0 0. 866025 0 0 0; - 0. 866025 - 1 0 - 1 0 0; - 0. 5 0 0 0 - 1 0; 0 1 0. 5 0 0 0; 0 0 - 0. 866025 0 0 - 1] ; b = [ 0 - 2000 0 0 0 0] ' ; F = A\ b F = - 1000 866. 03 - 1732. 1 0 500 1500

Therefore, F 1 = –1000

F 2 = 866.025

F 3 = –1732.1

 H 2 = 0

V 2 = 500

V 3 = 1500

8.11 cl c; f or mat shor t g k1=10; k2=40; k3=40; k4=10; m1=1; m2=1; m3=1; km=[ ( 1/ m1) *( k2+k1) , - ( k2/ m1) , 0 - ( k2/ m2) , ( 1/ m2) *( k2+k3) , - ( k3/ m2) 0, - ( k3/ m3) , ( 1/ m3) *( k3+k4) ] x=[ 0. 05; 0. 04; 0. 03] ; kmx=- km*x

km = 50 - 40 0 kmx =

- 40 80 - 40

0 - 40 50

- 0. 9 - 2. 2204e- 016 0. 1 PROPRIETARY MATERIAL . © The McGraw-Hill Companies, Inc. All rights reserved. No part of this Manual

may be displayed, reproduced or distributed in any form or by any means, without the prior written permission of the  publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw-Hill for their individual course preparation. If you are a student using this Manual, you are using it without permission.

7

1 = –0.9,  x2 = 0 , and  x3 = 0.1 m/s2. Therefore,  x 8.12 Vertical force balances can be written to give the following system of equations,

m1 g  k2 (x2  x1 )  k1 x1  0 m2 g  k3 (x3  x2 )  k2 ( x2  x1 )  0 m3 g  k4 (x4  x3 )  k3 ( x3  x2 )  0 m4 g  k5 (x5  x4 )  k 4 ( x4  x3 )  0 m5 g  k5 ( x5  x4 )  0

Collecting terms,

 k1  k2  k 2     

 k2 k 2  k3 k3

k3 k3  k 4  k4

k 4 k4  k5 k5

  x1   m1 g    x  m g    2   2    x3    m3 g   k5   x4   m4 g      k 5    x5   m5 g 

After substituting the parameters, the equations can be expressed as ( g = 9.81),

120 40   x1  637.65  40 110 70   x   735.75    2      70 170 100  x3    588.60     735.75 100 120  20  x4       20 20   x5  882.90 The solution can then be obtained with the following MATLAB script: cl c; f or mat shor t g g=9. 81; m1=65; m2=75; m3=60; m4=75; m5=90; k1=80; k2=40; k3=70; k4=100; k5=20; A=[ k1+k2 - k2 0 0 0 - k2 k2+k3 - k3 0 0 0 - k3 k3+k4 - k4 0 0 0 - k4 k4+k5 - k5 0 0 0 - k5 k5] b=[ m1*g m2*g m3*g m4*g m5*g] ' x=A\ b A = 120 - 40 0 0 0 b =

- 40 110 - 70 0 0

0 - 70 170 - 100 0

0 0 - 100 120 - 20

0 0 0 - 20 20

637. 65 735. 75 588. 6 PROPRIETARY MATERIAL . © The McGraw-Hill Companies, Inc. All rights reserved. No part of this Manual

may be displayed, reproduced or distributed in any form or by any means, without the prior written permission of the  publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw-Hill for their individual course preparation. If you are a student using this Manual, you are using it without permission.

8

735. 75 882. 9 x = 44. 758 118. 33 149. 87 166. 05 210. 2 8.13 The position of the three masses can be modeled by the following steady-state force balances

0  k ( x2  x1 )  m1 g  kx1 0  k ( x3  x2 )  m2 g  k ( x2  x1 ) 0  m3 g  k ( x3  x2 ) Terms can be combined to yield 2kx1  kx2

 m1 g

kx1  2kx2  kx3  m2 g  kx2  kx3  m3 g Substituting the parameter values

 30 15 0   x1   19.62   15 30 15  x    24.525    2      0 15 15   x3   29.43  A MATLAB script can be used to obtain the solution for the displacements cl c; f or mat shor t g g=9. 81; k=15; K=[ 2*k - k 0; - k 2*k - k; 0 - k k] m=[ 2; 2. 5; 3] ; mg=m*g x=K\ mg K = 30 - 15 0 mg =

- 15 30 - 15

0 - 15 15

19. 62 24. 525 29. 43 x = 4. 905 8. 502 10. 464 8.14 Just as in Sec. 8.3, the simultaneous equations can be expressed in matrix form as

PROPRIETARY MATERIAL . © The McGraw-Hill Companies, Inc. All rights reserved. No part of this Manual

may be displayed, reproduced or distributed in any form or by any means, without the prior written permission of the  publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw-Hill for their individual course preparation. If you are a student using this Manual, you are using it without permission.

9

 1  0   0   0  0   R12

1

1

0

0

1

0

1

1

0

1

0

0

0

0

0

1

 R52

 R32

0

 R54

 R52

0

 R65

0

0  i12 

 0       0  i52   0  1  i32   0       1  i65   0   R43  i54   0      0   i43  V1  V 6 

or substituting the resistances 1 0 0 0  i12   0  1 1  0 1 0 1  1 0  i52   0   i32   0  0 0 0 0 1  1       0 0 1 1 i65   0  0 0  0 10 10 0 15  5 i54   0       0    5 10 0 20 0 i43   200 This system can be solved with MATLAB, cl c; f or mat shor t g R12=5; R52=10; R32=10; R65=20; R54=15; R43=5; V1=200; V6=0; A=[ 1 1 1 0 0 0; 0 - 1 0 1 - 1 0; 0 0 - 1 0 0 1; 0 0 0 0 1 - 1; 0 R52 - R32 0 - R54 - R43; R12 - R52 0 - R65 0 0] B=[ 0 0 0 0 0 V1- V6] ' I =A\ B A = 1 0 0 0 0 5

1 -1 0 0 10 - 10

1 0 -1 0 - 10 0

0 1 0 0 0 - 20

0 -1 0 1 - 15 0

0 0 1 -1 -5 0

B = 0 0 0 0 0 200 I = 6. 1538 - 4. 6154 - 1. 5385 - 6. 1538 - 1. 5385 - 1. 5385 i21 = 6.1538

i52 = 4.6154

i32 = 1.5385

i65 = 

i54 = 1.5385

i43 = 1.5385

PROPRIETARY MATERIAL . © The McGraw-Hill Companies, Inc. All rights reserved. No part of this Manual

may be displayed, reproduced or distributed in any form or by any means, without the prior written permission of the  publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw-Hill for their individual course preparation. If you are a student using this Manual, you are using it without permission.

10

Here are the resulting currents superimposed on the circuit: 1.5385

6.1538 0

       5        8        3        5  .        1

       4        5        1        6  .        4

1.5385

6.1538

   –

 –6.1538

1.5385

200

8.15 The current equations can be written as

 i21  i 23  i52  0 i 23  i35  i 43  0  i43  i54  0 i35  i52  i65  i 54  0 Voltage equations: i21  i23  i43  i65 

V 2  20

35 V2  V 3 30 V4  V 3 8 140  V 5

i54  i35  i52 

V5  V 4

15 V3  V 5 7 V5  V 2

10

5

 1 1 1 0 0 0  0 1 0 1 1 0   0 0 0 0 1 1   0 0 1 1 0 1 35 0 0 0 0 0   0 30 0 0 0 0 0 0 0 0 8 0   0 0 0 0 0 15  0 0 0 7 0 0  0 0 10 0 0 0  0 0 0 0 0 0

 0       0 0 0 0 0 i23    0  0 0 0 0 0  i52   0      1 0 0 0 0  i35   0  0 1 0 0 0  i43  20     0 1 1 0 0  i54    0  0 0 1  1 0  i65   0      0 0 0 1  1 V 2   0      0 0  1 0 1  V 3   0  0 1 0 0  1 V 4   0      5 0 0 0 1  V 5  140  0

0

0

0

0  i21 

A MATLAB script can be developed to generate the solution, cl c; f or mat shor t g R12=35; R52=10; R32=30; R34=8; R45=15; R35=7; R25=10; R65=5; V1=20; V6=140; A=[ - 1 -1 1 0 0 0 0 0 0 0 0; 0 1 0 -1 1 0 0 0 0 0 0; PROPRIETARY MATERIAL . © The McGraw-Hill Companies, Inc. All rights reserved. No part of this Manual

may be displayed, reproduced or distributed in any form or by any means, without the prior written permission of the  publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw-Hill for their individual course preparation. If you are a student using this Manual, you are using it without permission.

11

0 0 0 0 -1 1 0 0 0 -1 1 0 -1 1 R12 0 0 0 0 0 0 0 R32 0 0 0 0 0 0 0 0 0 R34 0 0 0 0 0 0 0 R45 0 0 0 0 R35 0 0 0 0 0 R25 0 0 0 0 0 0 0 0 0 0 R65 B=[ 0 0 0 0 - V1 0 0 0 0 0 V6] ' I =A\ B

0 0 -1 -1 0 0 0 1 0

0 0 0 1 1 0 -1 0 0

0 0 0 0 -1 1 0 0 0

0; 0; 0; 0; 0; - 1; 1; - 1; 1]

I = 2. 5107 - 0. 55342 1. 9573 - 0. 42429 0. 12913 0. 12913 2. 5107 107. 87 124. 48 125. 51 127. 45

Thus, the solution is i21 = 2.5107 i54 = 0.12913 V 5 = 127.45

i23 = 0.55342 i65 = 2.5107

i52 = 1.9573 V 2 = 107.87

i35 = 0.42429 V 3 = 124.48

i43 = 0.12913 V 4 = 125.51

PROPRIETARY MATERIAL . © The McGraw-Hill Companies, Inc. All rights reserved. No part of this Manual

may be displayed, reproduced or distributed in any form or by any means, without the prior written permission of the  publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw-Hill for their individual course preparation. If you are a student using this Manual, you are using it without permission.

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF