Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sébastien Villemot
dynare
Commits
73fcf971
Commit
73fcf971
authored
12 years ago
by
Houtan Bastani
Browse files
Options
Downloads
Patches
Plain Diff
fix comment and error
parent
d640546e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/load_csv_file_data.m
+7
-7
7 additions, 7 deletions
matlab/load_csv_file_data.m
with
7 additions
and
7 deletions
matlab/load_csv_file_data.m
+
7
−
7
View file @
73fcf971
...
@@ -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
(
'
re
adcsv
::
Second
input
argument
has
to
be
equal
to
1
or
0
!
'
)
error
(
'
lo
ad
_
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
(
'
re
adcsv
::
Third
input
argument
has
to
be
equal
to
1
or
0
!
'
)
error
(
'
lo
ad
_
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
([
'
re
adcsv
:
I
can
''
t
find
file
'
file
'!'
])
error
([
'
lo
ad
_
csv
_file_data
:
I
can
''
t
find
file
'
file
'!'
])
end
end
else
else
error
(
'
re
adcsv
:
Wrong
file
extension
!
'
)
error
(
'
lo
ad
_
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
(
'
re
adcsv
::
Not
implemented
for
your
OS
!
'
)
error
(
'
lo
ad
_
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
(
'
re
adcsv
::
Formatting
error
.
I
can
''
t
read
the
dates
!
'
)
error
(
'
lo
ad
_
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment