# Talk:Chromosome structure via Euclidean Distance Matrices

### From Wikimization

(Difference between revisions)

(New page: <pre> %%% Ronan Fleming, E.coli molecule data %%% -Jon Dattorro, August 2008 clear all load ecoli frame = 12; % 1 through 12 G = her49imfs12movful...) |
Current revision (02:39, 10 January 2009) (edit) (undo)m (Protected "Talk:Chromosome structure via Euclidean Distance Matrices" [edit=autoconfirmed:move=autoconfirmed]) |
||

(13 intermediate revisions not shown.) | |||

Line 1: | Line 1: | ||

- | <pre> | ||

- | %%% Ronan Fleming, E.coli molecule data | ||

- | %%% -Jon Dattorro, August 2008 | ||

- | clear all | ||

- | load ecoli | ||

- | frame = 12; % 1 through 12 | ||

- | G = her49imfs12movfull(frame).cdata; % uint8 | ||

- | G = (double(G)-128)/128; % Gram matrix | ||

- | N = size(G,1); | ||

- | |||

- | D = diag(G)*ones(N,1)' + ones(N,1)*diag(G)' - 2*G; % EDM D | ||

- | |||

- | clear her49imfs12movfull G; | ||

- | |||

- | Vn = [-ones(1,N-1); speye(N-1)]; | ||

- | VDV = (-Vn'*D*Vn)/2; | ||

- | |||

- | clear D Vn | ||

- | |||

- | [evec evals flag] = eigs(VDV, [], 20, 'LR'); | ||

- | if flag, disp('convergence problem'), return, end; | ||

- | |||

- | close all | ||

- | |||

- | Xs = sqrt(real(evals(1:3,1:3)))*real(evec(:,1:3))'; % Projection of -VDV on PSD cone rank 3 | ||

- | plot3(Xs(1,:), Xs(2,:), Xs(3,:), '.') | ||

- | </pre> |