Completed exercise 2.2

This commit is contained in:
Sam Perry
2016-10-11 17:30:58 +01:00
parent e186519e21
commit 9bf9c8883b
+16
View File
@@ -0,0 +1,16 @@
% a function to plot
function plotPeak(peak_period, wave_height, timestamps)
figure
subplot(2,1,1)
plot(timestamps, wave_height);
title('Graph of wave height as function of time')
xlabel('Time')
ylabel('Wave Height')
datetick('x', 0)
subplot(2,1,2)
plot(timestamps, peak_period);
title('Graph of peak period as function of time')
xlabel('Time')
ylabel('Peak Period')
datetick('x', 0)