function A = bid(a,b)
%BID constructs a bidiagonal matrix with primary diagonal
% a, and superdiagonal b
%A = bid(a,b).
%Input: n x 1 vector a, and (n-1) x 1 vector b
%Output: bidiagonal matrix A

A = diag(a) + diag(b,1);
