cd /home/jlong/mnt/mocapsys-e/GigE_mocap_data/buddy140/buddy140_06012013

for ii = 2:4
    options.end_parfor = false;
    if ii == 4
        options.end_parfor = true;
    end
    
    if ii == 2
        load Data2/Data2_km/km_05280.mat
        
        % grab initial conditions for other runs
        options.ctrm      = [0 0 0];
        options.sp_coords = model_fit.sp_coords(2:4) - model_fit.offset;
        options.theta     = model_fit.theta;
        % don't re-compute the first frame using first frame parameters
        options.compute_first = false;
        
        kinematic_modelfit('buddy140_km',sprintf('Data%d',ii),5280,[],options)
    elseif ii == 3
        kinematic_modelfit('buddy140_km',sprintf('Data%d',ii),85,[],options)
    else
        kinematic_modelfit('buddy140_km',sprintf('Data%d',ii),[],[],options)
    end
    clear options
end