Not Enough Input Arguments - Error Message

4 ビュー (過去 30 日間)
Amritha Harikumar
Amritha Harikumar 2018 年 3 月 15 日
コメント済み: Amritha Harikumar 2018 年 3 月 19 日
Hi, I am trying to read an excel file with some code, with a 121x35 matrix. However, I think MATLAB is having difficulty processing such a big matrix, and I end up getting the following error:
Error using xlsread (line 260)
Not enough input arguments.
I tried running a test script, and xlsread worked fine on a smaller matrix. But, I am not sure how to get it to run for a bigger one. Here is the full line of code:
file = '/Users/amrithah/Desktop/Databases/Original Data/FC Matrices_Orig.xlsx';
m = xlsread(file,'ADHD_GSR'); %ADHD_GSR is a sheet in the file
m = [m(2:end,1:end-1);NaN([1,size(m,2)-1])]; %NaN removes all subsequent 'Inf' or 'NaN' cells
% group 1
a = m;
The point of this code is to read and extract the excel sheet, and subsequently input it into a variable called 'a', while excluding all NaN or Inf values.
Any help would be appreciated, thanks.
  3 件のコメント
Walter Roberson
Walter Roberson 2018 年 3 月 19 日
Amritha Harikumar: is it correct that you are on Mac? Or in particular that you are not on MS Windows with Excel installed?
Amritha Harikumar
Amritha Harikumar 2018 年 3 月 19 日
Hi,
I actually got it to work - the issue was that I didn't specify the cells in the sheet, and it was throwing back an error. Thanks!!

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeData Import from MATLAB についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by