This page list the various Matlab and octave utilities which interact with ADMB, typically generating input for and interpreting output from ADMB. It is meant to be as complete as possible. This means that it is likely to contain many non-essential files as well as the essential files, for defining and running data sets.

Adds the population trajectory defined in N_transpose to the current plot. Meant to add the true trajectory from generate_data.m to the plot made by datpar2plot.m, so you would do, for instance:

Nt = generate_data([800],[0.8 0.8],1e-1,0.15,'../cod_admb/cod',1,15,2,1*14*2,1980);
% (...run ADMB on the data set somehow, either from matlab/octave or in a separate terminal window...)
datpar2plot('../cod_admb/cod');
add_N_to_plot(Nt,1980,gcf)

function add_N_to_plot(N_transpose,first_year,figure_handle);
% add_N_to_plot(N_transpose,first_year,figure_handle)
%
% Given a figure made by datpar2plot, adds the population
% trajectory defined in N_transpose. N_transpose has one
% cohort per ROW, the oldest in the first row.
%
% Cohorts are assumed to be born in consecutive years,
% first_year being the first.
%
% Written by Lennart Frimannslund, April 2010.
if (exist('figure_handle','var') == 1),
% Set figure
figure(figure_handle);
end;
N0scale = 1000;
%N = N_transpose';
colors = {'r' 'g' 'b' 'c' 'm' 'y' 'k'};
hold on;
for (i=1:size(N_transpose,2)),
plot(first_year+(i-1)+[0:size(N_transpose,1)-1],N_transpose(:,i)/N0scale,sprintf('%s-^',colors{i}))
end;