Code

Setup functions

The setup functions help create the inputs to the core functions.

Below is a listing of the core functions along with a short description and an example of how to call the function. For details about each function, use the Matlab help command.
Ex: help computeInitialPoints

computeInitialPoints():
Generate a set of initial particle locations for modeling.
r0 = computeInitialPoints(BW,options)
[r0,Info] = computeInitialPoints(BW,options,'r0set',r0set,'problem_scales',problem_scales)
confiningForce():
Compute the potential force and return a function handle that takes in particle positions and returns the potential force at those positions.
dV = confiningForce(V, problem_scales, options)
create_scaleInvar_confining_potential():
Compute the confining potential based on the distance transform of a binary mask.
[V, scaleFactor] = create_scaleInvar_confining_potential(BW,options)
setup_problem():
Generate the confining force, the initial particle locations, and the scaling factors for the simulation.
[dV, r0, problem_scales, V, Info] = setup_problem(binned_data, data_range, options)
[dV, r0, problem_scales, V, Info] = setup_problem(binned_data, data_range, options, r0set)