close all
clear all

load('PowerHistory.mat');
load('WaveHistory.mat');
load('HourlyWaveData.mat');



Pb_history = Pb_history(1:length(heave_timeseries));

Pow_history = Pow_history(1:length(heave_timeseries));

date_history = date_history(1:length(heave_timeseries));

for i = 1:length(heave_timeseries)
  Hs(i) = 4*std(heave_timeseries{i}); 
end

xi = date_history(1):1/(24*4):date_history(end);

yi_meas = interp1(date_history,Pow_history,xi);
yi_max = interp1(date_history,Pb_history,xi);
yi_Hs = interp1(date_history,Hs,xi);

figure
subplot(3,1,1)
plot(date_history,Pow_history,'x',xi,yi_meas,'o');
subplot(3,1,2)
plot(date_history,Pb_history,'x',xi,yi_max,'o');
subplot(3,1,3)
plot(date_history,Hs,'x',xi,yi_Hs,'o');

figure
subplot(2,1,1)
plot(



