%written by Prof Peter Guth 2/9/2011 %starting point of lab in SO503 %uses "time_tide_weather.csv" % open the data file first with File, Import data % create a vector from each column of the data clc; serlen2=length(Time); %we started with 6 second data, and interpolate to 1 second TIME2=interp(Time,6); PRESS2=interp(Bar_mb,6); RES2=interp(residual,6); %see what interp did figure plot(Time,residual,TIME2,RES2); % Cross correlation figure [c_ww,lags] = xcorr(Bar_mb,residual,100,'coeff'); stem(lags,c_ww) figure scatter(Bar_mb,residual); TIME2=resample(Time,6,1); PRESS2=resample(Bar_mb,6,1); RES2=resample(residual,6,1); %see what resample did figure plot(Time,residual,TIME2,RES2);