-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCW2.m
32 lines (27 loc) · 906 Bytes
/
CW2.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
% script for coursework part 2
% establish mass matrix
M = [76500 0 0 0 0 0 0 0 0 0;
0 76500 0 0 0 0 0 0 0 0;
0 0 76500 0 0 0 0 0 0 0;
0 0 0 76500 0 0 0 0 0 0;
0 0 0 0 76500 0 0 0 0 0;
0 0 0 0 0 76500 0 0 0 0;
0 0 0 0 0 0 76500 0 0 0;
0 0 0 0 0 0 0 76500 0 0;
0 0 0 0 0 0 0 0 76500 0;
0 0 0 0 0 0 0 0 0 76500];
% establish stiffness matrix
K = [544093294.5 -272046647.2 0 0 0 0 0 0 0 0;
0 544093294.5 -272046647.2 0 0 0 0 0 0 0;
0 0 544093294.5 -272046647.2 0 0 0 0 0 0;
0 0 0 544093294.5 -272046647.2 0 0 0 0 0;
0 0 0 0 544093294.5 -272046647.2 0 0 0 0;
0 0 0 0 0 544093294.5 -272046647.2 0 0 0;
0 0 0 0 0 0 544093294.5 -272046647.2 0 0;
0 0 0 0 0 0 0 544093294.5 -272046647.2 0;
0 0 0 0 0 0 0 0 544093294.5 -272046647.2;
0 0 0 0 0 0 0 0 0 272046647.2];
% Find eigenvalues
eig_val = eig(K,M);
% Find eigenvector / where the V output is the vector
[V,D] = eig(K,M)