Skip to content
Snippets Groups Projects
Commit d9f3ab5b authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Partially revert commit #69efc894. Test for...

Partially revert commit #69efc894. Test for Octave/Matlab to decide how to call the print command. Added a warning stating that Octave cannot create pdf files.
parent d6020261
No related branches found
No related tags found
No related merge requests found
...@@ -31,11 +31,19 @@ function dyn_saveas(h,fname,DynareOptions) ...@@ -31,11 +31,19 @@ function dyn_saveas(h,fname,DynareOptions)
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. % along with Dynare. If not, see <http://www.gnu.org/licenses/>.
if any(strcmp('eps',cellstr(DynareOptions.graph_format))) if any(strcmp('eps',cellstr(DynareOptions.graph_format)))
eval(['print -depsc2 ' fname]);% '.eps']); if exist('OCTAVE_VERSION')
eval(['print -depsc2 ' fname '.eps']);
else
eval(['print -depsc2 ' fname]);
end
end end
if any(strcmp('pdf',cellstr(DynareOptions.graph_format))) if any(strcmp('pdf',cellstr(DynareOptions.graph_format)))
if exist('OCTAVE_VERSION')
warning('Octave cannot create pdf files!')
else
eval(['print -dpdf ' fname]); eval(['print -dpdf ' fname]);
end end
end
if ~exist('OCTAVE_VERSION') ... if ~exist('OCTAVE_VERSION') ...
&& any(strcmp('fig',cellstr(DynareOptions.graph_format))) && any(strcmp('fig',cellstr(DynareOptions.graph_format)))
if DynareOptions.nodisplay if DynareOptions.nodisplay
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment