function [x,y,z,days]=readdrog(file);
%function [x,y,z,days]=readdrog(file);
if(~exist('file')),
 file='trace.dat';
end
fid=fopen(file);
%line=fgetl(fid);
pars=fscanf(fid,'%f',3);
nfloats=pars(1);
dt=pars(2);

data=fscanf(fid,'%f');
n=length(data)/3 
nsteps=n/nfloats 

days=[0:nsteps-1]*dt/24/3600;
data=reshape(data,3,n)';
x=reshape(data(:,1),nfloats,nsteps);
y=reshape(data(:,2),nfloats,nsteps);
z=reshape(data(:,3),nfloats,nsteps);
x=x';
y=y';
z=z';
fclose(fid)
