Index in position 2 exceeds array bounds.(keep appearing this although I tried different arrays)
Show older comments
[tempData,~] =xlsread(rawDataFile,'Sheet1');
releaseCal.refP =x2mdate(tempData(:,1));
releaseCal.releaseDates =x2mdate(tempData(:,2:end));
Answers (1)
KSSV
on 5 Aug 2021
xlsread is obselete. USe readtable.
T = readtable(rawDataFile,'Sheet1');
You can convert it to the array using table2array. You can access any column using T.(1), T.(2), etc. While extracting any column keep the dimensions in mind.
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!