function timeDependent1d()

% aluminum
k = 220;
rhoc = 897;

f = 1;
l = 1;
T = 2e-3;

h = 0.1;
dt = 0.01e-3;
N = T/dt;

x = 0:h:l;
m = length(x)-1;

fFEM = f*ones(1,m);
kFEM = k*ones(1,m);
[M,A,b] = mkp1d_timeDependent(x,kFEM,fFEM);

u = zeros(m-1,1);
plot(x,[0,u',0]);
pause

for k=1:N
    u = ((1/dt)*M+A) \ (b+(1/dt)*M*u);
    plot(x,[0,u',0]);
    log = sprintf('t = %g',k*dt);
    title(log)
    pause(0.1)
end

