n=100;
A=spdiags((1:n)',0,n,n);
A(1,:)=A(1,:)+ones(1,n);
A(:,1)=A(:,1)+ones(n,1);