% Sample Matlab script for reading and plotting Biosonics data

addpath 'C:\Documents and Settings\Daniel\Data\P6314\Day4\Biosonics Echosounder'

fname = '20081009_161757.dt4';

dtx = rddtx(fname);

z = dtx.range;
int = dtx.vals;
time = dtx.imtime;

[year month day hour min sec] = datevec(dtx.imtime(1));
time = time - datenum(year, month, day, 0, 0, 0);

pcolor(time,z,int);
shading('interp');
set(gca,'ydir','reverse','tickdir','out','yminortick','on')
datetick('x','HH:MM','keeplimits');
xlabel([num2str(year),'/',num2str(month),'/',num2str(day)]);
ylabel('Depth (m)');