% Timing array:
% Rows: num fish
% Columns: num processors.

timing = [
1.401455      0.715526    0.406006   0.296871   0.326414  0.483610  0.874895 
5.391632      2.686544    1.396792   0.806448  	0.597527  0.659544  0.972313 
21.818332     10.781911   5.601784   2.847762  	1.648175  1.265967  1.369788 
80.973002     40.077137   20.013792  10.139821 	5.327172  3.187228  2.323323 
321.998448    159.055333  79.394597  39.762973 	20.221542 10.638905 6.202414 
1287.869540   635.038424  315.376417 157.737306	79.261378 40.275355 21.233330
];

nfish=[64 128 256 512 1024 2048];
nprocs=[1 2 4 8 16 32 64]; 
for i = 1:length(nprocs)
   speedup(:,i) = timing(:,1) ./ timing(:,i);
   efficiency(:,i) = speedup(:,i)/nprocs(i);
end

% Possible plots:

figure(1)
meshz(nprocs,nfish,speedup)
xlabel('Num Procs') 
ylabel('Num Fish')
zlabel('Speedup')
title('Speedup Plot')

figure(2)
meshz(nprocs,nfish,efficiency)
xlabel('Num Procs') 
ylabel('Num Fish')
title('Efficiency plot') 

figure(3)
plot(nprocs,speedup)
title('Speed plot')
xlabel('Num Procs') 
ylabel('Speedup')

gtext('2048 fish')
gtext('1024 fish')
gtext('512 fish')    
gtext('256 fish')    
gtext('128 fish')   
gtext('64 fish')   

figure(4)
plot(nprocs,efficiency)
title('Efficiency plot')
xlabel('Num Procs') 
ylabel('Efficiency')


gtext('2048 fish')
gtext('1024 fish')
gtext('512 fish')    
gtext('256 fish')    
gtext('128 fish')   
gtext('64 fish')   
