I figured out the my issue with the first function. In the above code using the function rotateXLabels the line set(gca,'XTickLabel',date) is not needed and datetick is needed.
close all
x = data;
k = 1; % In original code this is in a loop, defined here for convenience
gmt = x(:,1); % Origianl serial date is in GMT(UTC)
localt = gmt - 0.291666666395031; % Conversion from serial date in GMT to PST
figure(1)
plot(localt,x(:,22),'r',localt,x(:,23),'b')
grid on
datetick('x','mm/dd/yyyy','keepticks')
rotateXLabels(gca, 45)
set(gca,'XMinorTick','on','YMinorTick','on')
% If want a specific amount of tickmarks. Note that may want to turn Minor
% Tick marks (above) off
% NumTicks = 26;
% L = get(gca,'XLim');
% set(gca,'XTick',linspace(L(1),L(2),NumTicks))
ylim([0 800])
title(['Rod ',num2str(k), ' Axial Force'])
xlabel('Date')
ylabel('Rod Load [kips]')
legend(['Rod',num2str(k),'N Load (Primary)'],['Rod',num2str(k),'S Load... (Secondary)'])
set(legend,'FontSize',9)
I have not solved my issues with the other two functions, I assume there are similar fixes as to the one stated here.



