Final Julia Code

This commit is contained in:
Noah L. Schrick 2023-03-28 00:39:53 -05:00
parent e38e1476cd
commit 2eccde7bc6

View File

@ -54,18 +54,6 @@ plot(x, [vecs[:,1], vecs[:,2], vecs[:,3]],
title="wave functions", title="wave functions",
label=["E0", "E1", "E2"], linewidth=3, gridlinewidth=3) label=["E0", "E1", "E2"], linewidth=3, gridlinewidth=3)
# some julia linear linear algebra
A = [ [2 3 4]; [3 2 4]; [5 -3 8] ];
bvec = [6 8 1]';
y = A \ bvec; # use this in your function to solve the BVP
A * y # should match b = [6 8 1]
# * is matrix multiplication
y.*bvec # makes operator element wise
Ainv = A^(-1)
Ainv = inv(A)
Ainv * bvec
function Laplace_time(;alpha, L, T, h, u_tblr) function Laplace_time(;alpha, L, T, h, u_tblr)
# ; lets you ref arguments by name # ; lets you ref arguments by name
# Laplace_time(alpha=20, L=25, T=) # Laplace_time(alpha=20, L=25, T=)