MATLAB R2014a compatibility: fix crash of rplot with several variable names
Under MATLAB R2014a, the strjoin() function wants a 1×n cell array, and rejects a n×1 cell array. Octave and MATLAB R2020b are more permissive.time-shift
parent
f946baf6c5
commit
4944a711db
|
@ -14,7 +14,7 @@ function rplot(s1)
|
||||||
% SPECIAL REQUIREMENTS
|
% SPECIAL REQUIREMENTS
|
||||||
% none
|
% none
|
||||||
|
|
||||||
% Copyright (C) 2001-2019 Dynare Team
|
% Copyright (C) 2001-2021 Dynare Team
|
||||||
%
|
%
|
||||||
% This file is part of Dynare.
|
% This file is part of Dynare.
|
||||||
%
|
%
|
||||||
|
@ -78,9 +78,9 @@ if options_.rplottype == 0
|
||||||
hh=dyn_figure(options_.nodisplay,'Name', 'Simulated Trajectory');
|
hh=dyn_figure(options_.nodisplay,'Name', 'Simulated Trajectory');
|
||||||
plot(ix(i),y(:,i)) ;
|
plot(ix(i),y(:,i)) ;
|
||||||
if options_.TeX
|
if options_.TeX
|
||||||
title (['Plot of $' strjoin(s1_TeX, '~') '$'],'Interpreter','latex') ;
|
title (['Plot of $' strjoin(s1_TeX', '~') '$'],'Interpreter','latex') ;
|
||||||
else
|
else
|
||||||
title (['Plot of ' strjoin(s1, ' ')],'Interpreter','none') ;
|
title (['Plot of ' strjoin(s1', ' ')],'Interpreter','none') ;
|
||||||
end
|
end
|
||||||
xlabel('Periods') ;
|
xlabel('Periods') ;
|
||||||
xlim([min(ix(i)) max(ix(i))])
|
xlim([min(ix(i)) max(ix(i))])
|
||||||
|
@ -160,4 +160,4 @@ fprintf(fidTeX,'\\includegraphics[width=%2.2f\\textwidth]{%s}\n',0.8*scale_facto
|
||||||
fprintf(fidTeX,'\\caption{%s.}',caption);
|
fprintf(fidTeX,'\\caption{%s.}',caption);
|
||||||
fprintf(fidTeX,'\\label{Fig:%s:%s}\n',label_name,label_type);
|
fprintf(fidTeX,'\\label{Fig:%s:%s}\n',label_name,label_type);
|
||||||
fprintf(fidTeX,'\\end{figure}\n\n');
|
fprintf(fidTeX,'\\end{figure}\n\n');
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue