Skip to content

Commit

Permalink
<fix > Fixes #2:Changes suggested by Matt Donnelly have been made in …
Browse files Browse the repository at this point in the history
…plot_diagnostic_ow.m to correct the error that occurs when using Matlab2016b. Compatibility with older matlab version has been checked
  • Loading branch information
cabanesc committed Oct 10, 2019
1 parent 1341a79 commit 6d892d4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions matlab_codes/plot_diagnostics_ow.m
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,16 @@ function plot_diagnostics_ow( pn_float_dir, pn_float_name, po_system_configurati
xticklabels=get(h,'XTickLabel');
ii=find(xticks>360);
xticks(ii)=xticks(ii)-360;

for j=1:length(ii)
enough=num2str(ones(3,1));
c=char(num2str(xticks(ii(j))),enough');
if ischar(xticklabels)
xticklabels(ii(j),:)=c(1,:);
end
if iscell(xticklabels)
xticklabels(ii(j),:)=cellstr(c(1,:)); % Matt Donnelly: fix issue in Matlab 2016b
end
end
set(gca,'XTickLabel',xticklabels);

Expand Down

0 comments on commit 6d892d4

Please sign in to comment.