function modelmat=creat_u_d_cont_model th=linspace(-pi,pi,17); th=cos([th(1:16)]); for a=1:length(th) for b=1:length(th) modelmat(a,b)=(abs(angdiff(th(a),th(b)))/pi); %minor difference since we are using euclidean distance end end % figure;imagesc(modelmat) end