Skip to content
Snippets Groups Projects
Commit 73fcf971 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

fix comment and error

parent d640546e
Branches
Tags
No related merge requests found
...@@ -10,7 +10,7 @@ function [freq, init, data, varlist] = load_csv_file_data(file, withtime, withna ...@@ -10,7 +10,7 @@ function [freq, init, data, varlist] = load_csv_file_data(file, withtime, withna
%! @sp 1 %! @sp 1
%! @table @ @var %! @table @ @var
%! @item file %! @item file
%! string, name of the m file (matlab/octave script). %! string, name of the csv file
%! @item withtime %! @item withtime
%! Scalar integer, non zero iff the first column is for the dates of the observations. %! Scalar integer, non zero iff the first column is for the dates of the observations.
%! @item withnames %! @item withnames
...@@ -77,11 +77,11 @@ if ~withtime && ~withnames && noemptycell ...@@ -77,11 +77,11 @@ if ~withtime && ~withnames && noemptycell
end end
if ~( isequal(withtime,0) || isequal(withtime,1) ) if ~( isequal(withtime,0) || isequal(withtime,1) )
error('readcsv:: Second input argument has to be equal to 1 or 0!') error('load_csv_file_data:: Second input argument has to be equal to 1 or 0!')
end end
if ~( isequal(withnames,0) || isequal(withnames,1) ) if ~( isequal(withnames,0) || isequal(withnames,1) )
error('readcsv:: Third input argument has to be equal to 1 or 0!') error('load_csv_file_data:: Third input argument has to be equal to 1 or 0!')
end end
% Output initialization % Output initialization
...@@ -92,10 +92,10 @@ if check_file_extension(file,'csv') ...@@ -92,10 +92,10 @@ if check_file_extension(file,'csv')
try try
fid = fopen(file,'r'); fid = fopen(file,'r');
catch catch
error(['readcsv: I can''t find file ' file '!']) error(['load_csv_file_data: I can''t find file ' file '!'])
end end
else else
error('readcsv: Wrong file extension!') error('load_csv_file_data: Wrong file extension!')
end end
% bfile contains a vector of ascii codes. % bfile contains a vector of ascii codes.
...@@ -112,7 +112,7 @@ elseif ispc ...@@ -112,7 +112,7 @@ elseif ispc
elseif ismac elseif ismac
newline_code = 10; newline_code = 10;
else else
error('readcsv:: Not implemented for your OS!') error('load_csv_file_data:: Not implemented for your OS!')
end end
% Get the positions of the end-of-line code; % Get the positions of the end-of-line code;
...@@ -161,7 +161,7 @@ if withtime ...@@ -161,7 +161,7 @@ if withtime
tmp = linee(B:C); tmp = linee(B:C);
% Check the dates formatting % Check the dates formatting
if ~(isyearly(tmp) || isquaterly(tmp) || ismonthly(tmp) || isweekly(tmp)) if ~(isyearly(tmp) || isquaterly(tmp) || ismonthly(tmp) || isweekly(tmp))
error('readcsv:: Formatting error. I can''t read the dates!') error('load_csv_file_data:: Formatting error. I can''t read the dates!')
end end
if isyearly(tmp)==2 if isyearly(tmp)==2
% Remove the Y (gpm/iris date format) if necessary % Remove the Y (gpm/iris date format) if necessary
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment