I'm in the middle of getting the saccades and wall following to work.  The saccades are fine, but dealing with the wall via rate of rotation remains a challenge.  Should be resolved by next commit.
Added 'foraging.m', which now models the saccade turning and wall effect on foraging swimming.  It does not include any random behavior.  There are smaller modifications to 'simple_model.m', including the addition of parameters needed by 'foraging'
added 'prey_escape' back into workflow, imposed random escape direction and rotational speed of escape is now drawn from a normal distribution.
Simple_model now does not include parameter values or post-processing. Those functions are now performed in run_sim (batches will later run simple_model). coord_trans has been fixed, including coordinate transformations for the visual system.

Next, I need to articulate when a predator senses a prey, followed by the strike code.
Fine tune some of the code related to the visual system
This is a test for 'test-branch'.
fixed merge issue?
updated foraging to take in either prey or predator parameter structure, added routine swimming of prey. simple_model is now simulating both players.
Big commit!  (1) see_fish.m models the visual system of either fish. (2) I moved wall avoidance into simple_model.m. (3) animate_sim.m code moved into vis_results.m. (4) vis_instant.m added to plot the predator and prey for a moment of the simulation. (5) foraging.m replaced foraging_pred.m.  (6) I changed some of the parameter names in the 'p' structure of simple_model.m to match that of 'run_sim.m' so that functions can find those field whether during a simulation or during post-processing.

At this point, this code still does nothing with the prey.  The predator switches between wall avoidance, prey targeting, and saccades. However, with current parameters, few of the turns appear to have much to do with saccades.
I've merged the recent big commit with my previous version.

I didn't add any visual system for the prey, it still only responds when predator is within distance threshold. Code is running fine right now.
forgot to commit these files with previous merge, SourceTree was yelling at me.
Added code for the strike.  This includes use of the global variable 'captured', which ends the simulation when true.
I've moved the behavioral decision making code into 'give_behavior.m', which now uses the 's' structure in 'simple_model' to keep track of the behavioral state of predator and prey.  This has presently broken the animation code (to be fixed shortly), but simulations run fine.
Handling of parameter values made more modular: 'default_params.m' defines the default values for simulations (now include dimensions for each value), 'convert_params.m' handles normalizing my scaling constants, 'run_sim.m' and 'simple_model.m' were consequently made more simple.
Added post-processing that allows to a reconstruction of behavioral states that occurred during a simulation.  This was handled primarily by reconstruct.m, but other functions affected and visualization code added to vis_results.m.  Animation code still broken.

Also, fixed some bugs in parameter values (and dimensions).

The following were deleted, with code moving to other functions: pred_strike.m,  vis_instant.m
update of files for simulating Weihs situation., 'give_behavior' has a new case (Weihs) to give prey and red behavior. 'prey_escape' now needs a version input (full or Weihs)

added 'run_batch_sim', which sets up the parameters for Weihs and runs simulation
merge my previous commit (Weihs batch simulation) with post-processing commit
Started to modify the Weihs batching, but not seeing any minimum distance in the simulation results.  I'm going to jump back to Alberto's earlier version to see what went wrong.  Maybe my code change parameter values that messed things up.
I made some modest changes to streamline the code and ease post-processing.
updated run_batch_sim to run simulations for different prey response distances. The prey's initial position is what's being varied in the outermost loop. The data is stored in a cell 'S' and saved onto a Dropbox folder. The function will also plot the optimal angles from Weihs along with simulation results.