function A=companion_matrix(n)

v=zeros(1,n-1);
I_n_minus_1=eye(n-1);

A=[v 1; I_n_minus_1 v'];