function ep1misclook(NumOfDays) % EP1MISCLOOK - Graphs the contents of \oasis\eqpac\ep1\spec.misc % % Requires: READEQPAC % Brian Schlining % 29 Dec 1998 % Prompt for input if no input arguments are specified if ~nargin NumOfDays = str2num(input('How many days of data would you like to view? ','s')); end % Set the path to the data file depending on what type of machine this function is run from switch computer case 'PCWIN' % Assumes the pwd is /oasis/epqac/brian/ PathS = ['..\ep1\']; PathS = ['//tsunami.shore.mbari.org/oasis/eqpac/ep1/']; otherwise % Assigns an absolute path in UNIX PathS = ['/hosts/tsunami/oasis/eqpac/ep1/']; end FileLoc = [PathS 'spec.misc']; X = readeqpac(FileLoc, NumOfDays); fig1 = figure; set(fig1,'Name','Pitch and Roll of Surface Angle Sensors') subplot(3,1,1) pH(1) = plot(X(:,1),X(:,2),'r'); % Pitch at Noon hold on pH(3) = plot(X(:,1),X(:,6),'b'); % Pitch at 12:30 pH(2) = plot(X(:,1),X(:,3),'r:'); % Roll at Noon pH(4) = plot(X(:,1),X(:,7),'b:'); % Roll at 12:30 legend('Pitch at Noon', 'Pitch at 12:30','Roll at Noon','Roll at 12:30',0) %xlabel('Date') ylabel('Angle (degrees)') title('Pitch and Roll of Surface Angle Sensors') %set(gca,'XLim',[min(X(:,1)) now]) if NumOfDays < 50 dtick = 6; else dtick = 3; end hold off datetick('x',dtick) %fig2 = figure; subplot(3,1,2) %set(fig2,'Name','Temperature and Depth of 20m PRR') pH(1) = plot(X(:,1),X(:,4),'r'); % Temp at Noon hold on pH(2) = plot(X(:,1),X(:,8),'b'); % Temp at 12:30 legend('Temp at Noon','Temp at 12:30',0) ylabel('Temp [C]') %xlabel('Date') %set(gca,'XLim',[min(X(:,1)) now]) if NumOfDays < 50 dtick = 6; else dtick = 3; end hold off datetick('x',dtick) subplot(3,1,3) pH(1) = plot(X(:,1),X(:,5),'r'); % Depth at Noon pH(2) = plot(X(:,1),X(:,9),'b'); % Depth at 12:30 legend('Depth at Noon','Depth at 12:30',0) ylabel('Depth [m]'); xlabel('Date') %set(gca,'XLim',[min(X(:,1)) now]) if NumOfDays < 50 dtick = 6; else dtick = 3; end hold off datetick('x',dtick) YLim = get(gca,'YLim'); if YLim(1) < 15 YLim(1) = 15; end if YLim(2) > 33 YLim(2) = 33; end set(gca,'YLim',sort(YLim)); setfontsize(7)