How to select all values of a cell array between two cells?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Ibro Tutic
am 21 Apr. 2016
Kommentiert: Ibro Tutic
am 21 Apr. 2016
I was previously using 3 xlsread functions, and I realized this probably wasn't the best way to go about it. I was reading some data from tables, so using xlsread, I was able to specify what cells I want read (in this case, B2:P14). How would I do something similar in matlab (because table/array size may vary, how would I just go about getting all data located after (2,2), instead of from (2,2) to (14,16), for example)?
0 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 21 Apr. 2016
V=xlsread('file.xlsx')
out=V(2:end,2:end)
3 Kommentare
Guillaume
am 21 Apr. 2016
There is no guarantee whatsoever that V(2, 2) corresponds to cell B2 of the excel file. Since xlsread trims empty rows and columns V(2, 2) may be C3 or even AZ1500.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!