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

load_csv_file: try loading io package before error and expand error message

parent 8e9cd95a
Branches
Tags
No related merge requests found
...@@ -42,7 +42,13 @@ assert(exist(file, 'file') == 2, ['load_csv_file_data: I can''t find file ' file ...@@ -42,7 +42,13 @@ assert(exist(file, 'file') == 2, ['load_csv_file_data: I can''t find file ' file
if isoctave if isoctave
if ~user_has_octave_forge_package('io') if ~user_has_octave_forge_package('io')
error('The io package is required to read CSV files from Octave') try
pkg load io
catch
error(['The io package is required to read CSV files from Octave. ' ...
'It can be installed by running the following from the Octave ' ...
' command line: pkg install -forge io']);
end
end end
A = csv2cell(file); A = csv2cell(file);
[data, T, L] = parsecell(A); [data, T, L] = parsecell(A);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment