function A=make3diag(d1,d2,n)
% function A=make3diag(d1,d2,n)
% Creates threediagonal matrix of order n
% d1,d2 (constants) - main diagonal (d1) and 
% 		      diagonals around (d2)

A=d1*eye(n);
B=d2*diag(ones(1,n-1),-1);
A=A+B+B';
