Assign excel data to multi-dimensional array
이전 댓글 표시
Hi I want to assign data repetitively in an excel spreadsheet to a n*n*5 dimensional array, ie 5 pages.
% User inputs
ExcelFile = '\InputData.xlsx';
SheetNumber = 1;
InputDataRange = 'B5:Y910';
[alldata, text, ~] = xlsread(ExcelFile, SheetNumber, InputDataRange);
data=alldata(:,:,1)
data=alldata(:,:,2)
data=alldata(:,:,n)
data=alldata(:,:,5).....etc
I get an error message stating "Index exceeds matrix dimensions."
Any ideas? Regards
답변 (1개)
Azzi Abdelmalek
2014년 7월 22일
편집: Azzi Abdelmalek
2014년 7월 22일
Change this line (alldata should be the third output argument)
[~,text,alldata] = xlsread(ExcelFile, SheetNumber, InputDataRange);
댓글 수: 7
bugatti79
2014년 7월 22일
bugatti79
2014년 7월 22일
bugatti79
2014년 7월 22일
Azzi Abdelmalek
2014년 7월 22일
What the size of alldata? type
size(alldata)
bugatti79
2014년 7월 22일
bugatti79
2014년 7월 22일
Mevlut K
2020년 12월 26일
Hi Azzi
I have seen so many post from you on the Matlab discussion forum. I had a question, that i cannot solve. Do you have any possibility to see that. I share the screenshot from the error.

카테고리
도움말 센터 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!