Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
33bac21c
Commit
33bac21c
authored
Mar 22, 2013
by
Ferhat Mihoubi
Browse files
Adds end of line codes for various environments
parent
19032f4b
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/load_csv_file_data.m
View file @
33bac21c
...
@@ -107,12 +107,20 @@ fclose(fid);
...
@@ -107,12 +107,20 @@ fclose(fid);
%
Set
newline
code
(
ok
for
*
nix
,
check
for
mac
and
windows
)
%
Set
newline
code
(
ok
for
*
nix
,
check
for
mac
and
windows
)
if
isunix
if
isunix
newline_code
=
10
;
newline_code
=
10
;
elseif
ispc
newline_code
=
13
;
elseif
ismac
newline_code
=
10
;
else
else
error
(
'
readcsv
::
Not
implemented
for
your
OS
!
'
)
error
(
'
readcsv
::
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
;
end_of_line_locations
=
find
(
bfile
==
newline_code
);
end_of_line_locations
=
find
(
bfile
==
newline_code
);
if
ispc
&&
isempty
(
end_of_line_locations
)
newline_code
=
10
;
end_of_line_locations
=
find
(
bfile
==
newline_code
);
end
;
tmp
=
find
(
bfile
==
newline_code
);
tmp
=
find
(
bfile
==
newline_code
);
%
Get
the
number
of
lines
in
the
file
.
%
Get
the
number
of
lines
in
the
file
.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment