function hyp()
                                                                                                      
h = 0.1;
k = 0.05;
alpha = 2;
l = alpha*k/h;
xmin = 0;
xmax = 1;
tmin = 0;
tmax = 1;
x = xmin:h:xmax;
t = tmin:k:tmax;
                                                                                                      
n = length(x);
m = length(t);
                                                                                                      
w = zeros(n,m);
                                                                                                      
% initialization
for i = 1:n;
    w(i,1) = sin(pi*x(i));
end
                                                                                                      
for i = 2:n-1;
    w(i,2) =(1-l^2)*sin((pi*x(i)))+1/2*l^2*(sin(pi*x(i))+sin(pi*x(i-1)));
end
                                                                                                      
for j = 2:m-1;
    for i = 2:n-1;
        w(i,j+1) =2*(1-l^2)*w(i,j)+l^2*(w(i+1,j)+w(i-1,j))-w(i,j-1);
    end
end

w(:,m)

