Packing files will have vecPosX and vecPoxY and are of size [N x 1] where N is the number of particles after cleanRats(). They are not sorted in any particular order.
To get the position of particle j, simple access
j = 2;
vecPosX(j)
vecPosY(j)
options.hertzian = trueWhen pack() is run with options.hertzian = true, the output .mat file contains three additional variables describing the linearized contact network at the jammed state.
So there be the particle index j and now a contact index k.
data = load('2D_N400_P0.0001_Width20_Seed1.mat');
k = 1; % pick contact k
ii = data.vecHertzNN(k); % index of particle i
jj = data.vecHertzMM(k); % index of particle j
x_i = data.vecPosX(ii); % position of particle i
x_j = data.vecPosX(jj); % position of particle j
d_i = data.vecDiameter(ii); % diameter of particle i
keff = data.vecHertzKeff(k); % stiffness of this contact
vecHertzNN(k) < vecHertzMM(k) always — each pair is stored oncecleanRats particle list — they index directly into vecPosX, vecPosY, vecDiameter (and vecPosZ for 3D)