From c121d7a4d1b4293aa48fba17ef8ad762572bcf4a Mon Sep 17 00:00:00 2001 From: sebastien Date: Mon, 23 Nov 2009 15:16:16 +0000 Subject: [PATCH] writedata.m: fail if using Octave or MATLAB 6.5, which don't have xlswrite git-svn-id: https://www.dynare.org/svn/dynare/trunk@3162 ac1d8469-bf42-47a9-8791-bf33cf982152 --- matlab/writedata.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/matlab/writedata.m b/matlab/writedata.m index 6a6eb0147..44ae0c4e3 100644 --- a/matlab/writedata.m +++ b/matlab/writedata.m @@ -28,6 +28,12 @@ function writedata(fname) % along with Dynare. If not, see . global M_ oo_ + + % xlswrite doesn't exist on Octave, and appeared in MATLAB 7.0 + if exist('OCTAVE_VERSION') || matlab_ver_less_than('7.0') + error('Function not supported on your version of MATLAB or Octave') + end + S=[fname '_endo.xls']; n=size(oo_.endo_simul,2); delete(S); @@ -44,4 +50,3 @@ function writedata(fname) xlswrite([fname '_exo'], S','exogenous', 'B1'); xlswrite([fname '_exo'], S1, 'exogenous', 'A2'); xlswrite([fname '_exo'], oo_.exo_simul,'exogenous', 'B2'); -return; \ No newline at end of file