MATLAB: How to create a symmetric Toeplitz matrix with bounds on eigenvalues

eigenvalueshomeworksymmetrictoeplits

Is there a way to creat a symmetic Toeplitz matrix of size 400 X 400 with real entries and its largest eigenvalue is 5 and the smallest eigenvalue is -5?

Best Answer

R=fft(eye(400))/sqrt(400);
e=zeros(1,400);
e(2)=-10; e(end-1)=+10;
e=ifftshift(e);
T=(R'*diag(e)*R);
T=real((T+T.')/2);
>> min(eig(T))
ans =
-5.0000
>> max(eig(T))
ans =
5.0000
>> norm(T-T.')
ans =
0