readbuoydata

readbuoydata - data.date = datenum([A(1:5,:);...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function [data, count] = readbuoydata1(datafile) fid = fopen(datafile,'r'); %Open datafile tline = fgetl(fid); %Read next line of file tline = fgetl(fid); %Read next line of file [A,count] = fscanf(fid,'%d %d %d %d %d %f %f %d %f %f',[10 inf]); %Read file and convert into array A. Count is te number of successful reads
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: data.date = datenum([A(1:5,:); zeros(1,size(A,2))]')'; %Convert date/time in specified vectors data.Hs = A(6,:); % significant wave height data.Tp = A(7,:); % peak period data.Dp = A(8,:); % peak period direction data.Ta = A(9,:); % average period data.SST = A(10,:); % sea surface temperature end...
View Full Document

Ask a homework question - tutors are online