Skip to content

jws13005/04_linear_algebra

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

04_linear_algebra

Homework 4

#PROBLEM 2#

#PART A#


H = (hilb(4));

N1 = norm(H,1)

N2 = norm(H,2)

Nf = norm(H, 'fro')

Ni = norm(H, inf)

N1 = 2.0833

N2 = 1.5002

Nf = 1.5097

Ni = 2.0833


H = (hilb(5));

N1 = norm(H,1)

N2 = norm(H,2)

Nf = norm(H, 'fro')

Ni = norm(H, inf)

N1 = 2.2833

N2 = 1.5671

Nf = 1.5809

Ni = 2.2833

#PART B#


 H = inv((hilb(4)));

N1 = norm(H,1)

N2 = norm(H,2)

Nf = norm(H, 'fro')

Ni = norm(H, inf)

N1 = 1.3620e+04

N2 = 1.0341e+04

Nf = 1.0342e+04

Ni = 1.3620e+04


H = inv((hilb(5)));

N1 = norm(H,1)

N2 = norm(H,2)

Nf = norm(H, 'fro')

Ni = norm(H, inf)

N1 = 4.1328e+05

N2 = 3.0414e+05

Nf = 3.0416e+05

Ni = 4.1328e+05

#Part C#

H = (hilb(4));

condN2 = (cond(H))

condN1 = (cond(H, 1))

condNf = (cond(H, 'fro'))

condNi = (cond(H, inf))

condN2 = 1.5514e+04

condN1 = 2.8375e+04

condNf = 1.5614e+04

condNi = 2.8375e+04


 H = (hilb(5));

condN2 = (cond(H))

condN1 = (cond(H, 1))

condNf = (cond(H, 'fro'))

condNi = (cond(H, inf))

condN2 = 4.7661e+05

condN1 = 9.4366e+05

condNf = 4.8085e+05

condNi = 9.4366e+05

#PART 3-4#

REFER TO .m FILES IN REPOSITORY

#PROBLEM 5#

Stiffness Matrix A + Error

k = 1000;

k1 = k;

k2 = k;

k3 = k;

k4 = k;

K = [k1+k2,-k2,0,0;-k2,k2+k3,-k3,0;0,-k3,k3+k4,-k4;0,0,-k4,k4];

x = cond(K)

e = esp*x

CONDITION = x = 29.2841

ERROR = e = 6.5024e-15

Stiffness Matrix B + Error

k = 1000;

k1 = k;

k2 = 1000*10^12;

k3 = k;

k4 = k;

K = [k1+k2,-k2,0,0;-k2,k2+k3,-k3,0;0,-k3,k3+k4,-k4;0,0,-k4,k4];

x = cond(K)

e = esp*x

CONDITION = x = 4.2361e12

ERROR = e = 9.4060e-04

Stiffness Matrix C + Error

k = 1000;

k1 = k;

k2 = 1000*10^-12;

k3 = k;

k4 = k;

K = [k1+k2,-k2,0,0;-k2,k2+k3,-k3,0;0,-k3,k3+k4,-k4;0,0,-k4,k4];

x = cond(K)

e = esp*x

CONDITION = x = 4.1493e17

ERROR = e = 92.1326

#PROBLEM 6#

PART A


k = 1000;
k1 = k;
k2 = k;
k3 = k;
k4 = k;
e = [-k2,-k3,-k4];
f = [k1+k2,k2+k3,k3+k4,k4];
[d,u] = chol_tridiag(e,f);
b = [1;1;1;1];
[x] = solve_tridiag(u,d,b)

X = DISPLACEMENTS(meters): x1 = 0.0025, x2 = 0.0050, x3 = 0.0075, x4 = 0.0100

PART B


k = 1000;
k1 = k;
k2 = 1000*10^12;
k3 = k;
k4 = k;
e = [-k2,-k3,-k4];
f = [k1+k2,k2+k3,k3+k4,k4];
[d,u] = chol_tridiag(e,f);
b = [1;1;1;1];
[x] = solve_tridiag(u,d,b)

X = DISPLACEMENTS(meters): x1 = 0.0023, x2 = 0.0023, x3 = 0.0047, x4 = 0.0070

PART C


k = 1000;
k1 = k;
k2 = 1000*10^-12;
k3 = k;
k4 = k;
e = [-k2,-k3,-k4];
f = [k1+k2,k2+k3,k3+k4,k4];
[d,u] = chol_tridiag(e,f);
b = [1;1;1;1];
[x] = solve_tridiag(u,d,b)

X = DISPLACEMENTS(meters x 10^9): x1 = 0.0030, x2 = 3.0087, x3 = 3.0057, x4 = 2.9997

#PROBLEM 7#

Function stored as .m file in repository

Answer is most likely wrong


[v,w] = mass_spring_vibrate(10,20,20,10)

v =

   -0.8892   -0.7282    0.5219
    0.4561   -0.6222    0.6699
   -0.0348    0.2873    0.5280


w =

    6.3450         0         0  < -- Natural Freq m1

         0    3.5935         0  < -- Natural Freq m2

         0         0    2.0804  < -- Natural Freq m3

#PROBLEM 8#

# of segments largest load (N) smallest load (N) # of eigenvalues
5 10999 1161 4
6 16337 1173 5
10 47450 1190 9

About

Homework 4

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages