% vbsdata.m

%addpath /data12/sodata/pwiebe

%This also works for nbp0103 data - added 11/9/01  mda

%load nbp0104_wholesurvey.mat

%This gives you three files:  file1 with time/lat/lon
%	File2 with depth data
%	file3 with decibels (very large)

fid1=fopen('/data12/sodata/pwiebe/myout.txt','w');

%if you don't rewrite them, you will get scientific notation.  This is ok 
%	for the depth and position/time data, but not OK for the
%	decibel data.

%for i=1:length(file3)
%	fprintf(fid1,'%3.0f ',file3(i,:));
%	fprintf(fid1,'\n');
%end;

for i=1:length(sv120)
	fprintf(fid1,'%3.0f ',sv120(i,:));
	fprintf(fid1,'\n');
end;

fclose(fid1);

%the formatted print statement automatically saves file3 as ascii, but to save 
%	the other files, you must do it explicitly.
%However, once it's done, you don't need to do it again, so I commented these
%	lines out.

testing = depths(:,:);
save('fout','testing','-ascii');
%type fout
clear testing

testing = coords(:,:);
save('fout2','testing','-ascii');
clear testing

clear all

%exit