Commit f92965b2 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

CSV datafiles: document it, autodetect extension

parent 8311caf3
......@@ -3961,7 +3961,7 @@ graphs of smoothed shocks, smoothed observation errors, smoothed and historical
@item datafile = @var{FILENAME}
The datafile: a @file{.m} file, a @file{.mat} file or, a
The datafile: a @file{.m} file, a @file{.mat} file, a @file{.csv} file, or a
@file{.xls}/@file{.xlsx} file (the latter format is supported under Octave
if the @uref{,io} and
@uref{,java} packages from
......@@ -17,7 +17,7 @@ function dyn_data_01=read_variables(file_name_01,var_names_01,dyn_data_01,xls_sh
% all local variables have complicated names in order to avoid name
% conflicts with possible user variable names
% Copyright (C) 2005-2012 Dynare Team
% Copyright (C) 2005-2013 Dynare Team
% This file is part of Dynare.
......@@ -54,8 +54,10 @@ if isempty(extension)
extension = '.xls';
elseif exist([basename '.xlsx'],'file')
extension = '.xlsx';
elseif exist([basename '.csv'],'file')
extension = '.csv';
error(['Can''t find datafile: ' basename '.{m,mat,xls,xlsx}']);
error(['Can''t find datafile: ' basename '.{m,mat,xls,xlsx,csv}']);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment