%COMP 256 Assignment 2
%Adrian Ilie

function c=closest(m)
%closest matrix in Frobenius norm
[u,d,v]=svd(m);
d(3,3)=0;
c=u*d*v';