function [ M, A, K ] = construct_matrices( C, nx, dx )

A = zeros(nx,1)';
M = zeros(nx,1)';
K = zeros(nx,1)';


A(1) = C(1);
A(end) = C(end);

K(1) = 1/dx;
K(end) = 1/dx;


for i = 2:size(M,2)-1
    M(i) = C(i)^2;
    K(i) = 1/dx^2;

end



