From 36ec2561bf2fb5638f1671987c9633ad1c284f2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Tue, 26 Nov 2013 18:15:11 +0100 Subject: [PATCH] load_xls_file_data: under Octave, fail gracefully if io is not present --- matlab/load_xls_file_data.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/matlab/load_xls_file_data.m b/matlab/load_xls_file_data.m index a45e1cfc3..0dd11000f 100644 --- a/matlab/load_xls_file_data.m +++ b/matlab/load_xls_file_data.m @@ -61,6 +61,9 @@ if ~(check_file_extension(file,'xls') || check_file_extension(file,'xlsx')) end % load excel file. +if isoctave && ~user_has_octave_forge_package('io') + error('The io package is required to read XLS/XLSX files from Octave') +end [num,txt,raw] = xlsread(file, sheet, range); % Get dimensions of num, txt and raw