% EXAMPLE script which runs the simple model on synthetic data, % and then plots the results. % If on Octave, turn off the pausing of text output try, more off; end; % Enter the proper directory % cd ~lennartfr/common_files/mfiles % Define parameters for data generation N0 = [200 400 600]; q = [0.4 0.6]; s = 0.1; M = 0.15; startyear = 1980; num_survey_indices = inf; num_years = 15; catch_factor = 2; % Define directories and file names cod_dir = '../cod_admb'; base_dir = pwd; filename = [cod_dir '/cod']; % Generate data This will create (or overwrite) % the files cod.dat and cod.pin in the directory defined by cod_dir. % The return variable Nt is the true trajectory (transposed) Nt = generate_data(N0,q,s,M,filename,length(N0),num_years, ... length(q),num_survey_indices,startyear,catch_factor); % Enter directory where admb program is found cd(cod_dir); % Run ADMB unix('unset LD_LIBRARY_PATH; ./cod'); % Return to mfile directory and plot cd(base_dir); datpar2plot(filename); % Add true trajectory to plot add_N_to_plot(Nt,startyear,gcf)