function M = DIF_gentridiag(x1,x2,x3,num_rows)
%

M = zeros(num_rows,num_rows);
for r = 1:num_rows
    M(r,r) = x2;
    if r>1
        M(r,r-1) = x1;
    end
    if r<num_rows
        M(r,r+1) = x3;
    end
end
