0% found this document useful (0 votes)
21 views

21.10.2019 15:58 MATLAB Command Window 1 of 4

The document shows MATLAB code that is performing matrix operations and calculations. It defines several matrices, including aTgen, kr, and Krgen. It then performs operations like matrix multiplication and inversion on these matrices. For example, it calculates Krgen by multiplying aTgen, kr, and the transpose of aTgen. It also defines vectors like rm and r and performs operations like matrix-vector multiplication to calculate r and F.

Uploaded by

Osman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

21.10.2019 15:58 MATLAB Command Window 1 of 4

The document shows MATLAB code that is performing matrix operations and calculations. It defines several matrices, including aTgen, kr, and Krgen. It then performs operations like matrix multiplication and inversion on these matrices. For example, it calculates Krgen by multiplying aTgen, kr, and the transpose of aTgen. It also defines vectors like rm and r and performs operations like matrix-vector multiplication to calculate r and F.

Uploaded by

Osman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

21.10.

2019 15:58 MATLAB Command Window 1 of 4

>> aTgen=[0 1 0 0 0 0;0 0 0 1 0 0;0 0.25 0.25 -1 0 0;-1 0 0 0 -0.25 -0.25;0 0 1 0 0 1]

aTgen =

0 1.0000 0 0 0 0
0 0 0 1.0000 0 0
0 0.2500 0.2500 -1.0000 0 0
-1.0000 0 0 0 -0.2500 -0.2500
0 0 1.0000 0 0 1.0000

>> aT=aTgen'

aT =

0 0 0 -1.0000 0
1.0000 0 0.2500 0 0
0 0 0.2500 0 1.0000
0 1.0000 -1.0000 0 0
0 0 0 -0.2500 0
0 0 0 -0.2500 1.0000

>> agen=aTgen'

agen =

0 0 0 -1.0000 0
1.0000 0 0.2500 0 0
0 0 0.2500 0 1.0000
0 1.0000 -1.0000 0 0
0 0 0 -0.2500 0
0 0 0 -0.2500 1.0000

>> kr=[675000 0 0 0 0 0;0 20250 10125 0 0 0;0 10125 20250 0 0 0;0 0 0 675000 0 0;0 0 0
0 20250 10125;0 0 0 0 10125 20250]

kr =

675000 0 0 0 0 0
0 20250 10125 0 0 0
0 10125 20250 0 0 0
0 0 0 675000 0 0
0 0 0 0 20250 10125
0 0 0 0 10125 20250

>> Krgen=aTgen*kr*agen

Krgen =

1.0e+05 *

0.2025 0 0.0759 0 0.1013


0 6.7500 -6.7500 0 0
0.0759 -6.7500 6.7880 0 0.0759
0 0 0 6.7880 -0.0759
0.1013 0 0.0759 -0.0759 0.4050
21.10.2019 15:58 MATLAB Command Window 2 of 4

>> K22=[678800 0 7590;0 678800 -7590;7590 -7590 40500]

K22 =

678800 0 7590
0 678800 -7590
7590 -7590 40500

>> K22ters=inv(K22)

K22ters =

1.0e-04 *

0.0148 -0.0000 -0.0028


-0.0000 0.0148 0.0028
-0.0028 0.0028 0.2480

>> K21=[7590 -675000;0 0;10130 0]

K21 =

7590 -675000
0 0
10130 0

>> rm=[0.05;-0.01]

rm =

0.0500
-0.0100

>> r=K22ters*(-1*K21*rm)

r =

-0.0104
-0.0001
-0.0106

>> rgen=[0.05;-0.01;-0.0104;-0.00012;0.0106]

rgen =

0.0500
-0.0100
-0.0104
-0.0001
0.0106

>> F=kr*agen*rgen

F =
21.10.2019 15:58 MATLAB Command Window 3 of 4

1.0e+03 *

0.0810
1.0408
0.6419
0.2700
0.1082
0.2156

>> rgen=[0.05;-0.01;-0.0104;-0.00012;-0.0106]

rgen =

0.0500
-0.0100
-0.0104
-0.0001
-0.0106

>> F=kr*agen*rgen

F =

81.0000
826.2000
212.6250
270.0000
-106.4138
-213.7388

>> T12=[-1 0 0;0 -1/4 -1/4;0 1 0;1 0 0;0 1/4 1/4;0 0 1]

T12 =

-1.0000 0 0
0 -0.2500 -0.2500
0 1.0000 0
1.0000 0 0
0 0.2500 0.2500
0 0 1.0000

>> F1=[79.85;826.56;213.24]

F1 =

79.8500
826.5600
213.2400

>> F2=[259.95;-106.17;-213.24]

F2 =

259.9500
21.10.2019 15:58 MATLAB Command Window 4 of 4

-106.1700
-213.2400

>> S1=T12*F1

S1 =

-79.8500
-259.9500
826.5600
79.8500
259.9500
213.2400

>> S2=T12*F2

S2 =

-259.9500
79.8525
-106.1700
259.9500
-79.8525
-213.2400

>>

You might also like