% EXAMPLE script which runs the model with two Ms on real 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 data files catchall = '../ICES_AFWG_2009/ices_afwg_2009_table37_1_2_zero.txt'; surveyfiles = '../ICES_AFWG_2009/ices_afwg_2009_tableA13.txt'; % Define directories and file names cod_dir = '../cod_two_Ms'; base_dir = pwd; filename = [cod_dir '/cod']; % Generate data from tables. This will create (or overwrite) % the files cod.dat and cod.pin in the directory defined by cod_dir. table2admb(catchall,surveyfiles,1985,1995,9,3,filename); % Enter directory where admb program is found cd(cod_dir); % Note that table2admb generates pin file for the simple model, so we need to add one zero % since we are running the model with two Ms unix('echo 0 >> cod.pin'); % Run ADMB unix('unset LD_LIBRARY_PATH; ./cod'); % Return to mfile directory and plot cd(base_dir); datpar2plot(filename);