GPUE  v1.0
GPU Gross-Pitaevskii Equation numerical solver for Bose-Einstein condensates
binData.m
Go to the documentation of this file.
1 function [g6B,bin] = binData(g6C,binMax,bins)
2 %Bin the data returned from g6_struct into equi-separated partitions
3 % g6C: Matrix containing the g6 values output from g6_struct
4 % binMax: The maximum binning value
5 % bins: The number of bins to take
6 %Returns
7 % g6B: The binned g6 data
8 % bin: The bin values of g6B
9 
10 bin = linspace(0,binMax,bins);
11 g6B = zeros(length(bin)-1,1);
12 for kk=1:(length(bin)-1)
13  idx = find( g6C(1,:) >= bin(kk) & g6C(1,:) < bin(kk+1) );
14  if length(idx) >0
15  g6B(kk) = sum(g6C(2,idx))./length(idx); %Average the values in a bin
16  else
17  g6B(kk) = 0;
18  end
19 end
20 
21 end
vtxLost idx
Definition: loadVtx.m:15
__global__ void zeros(double *field, int n)
Creates a field of all zeros ,.
tic for a
Definition: GPE_2d.m:90
for kk
Definition: binData.m:12
% Indexing needs to % be modified if you wish to use the ordered data sets % Calculate the Voronoi diagram of the resulting data
Definition: VtxCorr.m:36
if length(idx) >0 g6B(kk)
g6B
Definition: binData.m:11
end g6C
Definition: g6_struct.m:30