Skip to content

Commit

Permalink
Analysis files add
Browse files Browse the repository at this point in the history
  • Loading branch information
mlxd committed Dec 16, 2016
1 parent 75a55c0 commit 0e8e307
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 38 deletions.
14 changes: 12 additions & 2 deletions matlab/psi6.m
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
function [psi6_pos,nn] = psi6(pos,X,Y,radius)
[nn,idx] = findNN(pos,X,Y,radius);
%Calculate the orientational order parameter defined at point pos
%between the points (X,Y)
% pos: Defines the location to calculate the orientational order
% X,Y: Vector of entire X,Y range of points
% radius: Radius over which to determine neighbouring points
%Returns
% psi6_pos: The value of orientational order psi_6 at position pos
% nn: Number of nearest neighbours

[nn,idx] = findNN(pos,X,Y,radius); %find number of neighbours and indices of
%neighbours for X,Y
psi6_pos = 0;

if size(nn,1) > 0
for ii=1:size(nn,1)
psi6_pos = psi6_pos + exp(6*1i*getAngle2(pos, [X(idx(ii)), Y(idx(ii))] ));
psi6_pos = psi6_pos + exp(6*1i*getAngle(pos, [X(idx(ii)), Y(idx(ii))] ));
end
psi6_pos = psi6_pos./length(nn);
end
Expand Down
36 changes: 0 additions & 36 deletions matlab/voronoi_cells.m

This file was deleted.

0 comments on commit 0e8e307

Please sign in to comment.