Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
function [dis_min, true_num] = finding_true_num_2D(p0,p_s)
% =========================================================================
% sub function called by iterative particle reconstruction
% determine the true particle in the original volume
% that the reconstructed particle corresponds to.
% by Tianqi Guo, Aug 2017
% =========================================================================
% calculate the distance in x, y, z the reconstructed particle with
% all the true particles in the original volume
du_i = (p0(:,1) - p_s(ones(size(p0,1),1),1));
dv_i = (p0(:,2) - p_s(ones(size(p0,1),1),2));
% finding the closest true particle and return the distance
g_t = sum([du_i dv_i].^2,2).^0.5;
[dis_min, true_num] = min(g_t);
end