How to sort Data from an Excel File...
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Lauren Kilgore
am 21 Nov. 2019
Kommentiert: Walter Roberson
am 25 Nov. 2019
I am wanting to create a code that will read from an Excel file (I have attached an example below). I want the total number of students, check-in types to be sorted, and for the date and time to be sorted. I am very new to Matlab and this would help make my job much easier!
[~,~,rawData] = xlsread('matlabproject.xlsx');
2 Kommentare
Walter Roberson
am 21 Nov. 2019
mask = ismember(rawData(:,3), {'Student Check-In (DB)', 'Student Check-Out (DB)'});
student_subset = rawData(mask,:);
Now you can start processing to find the unique column 2 (names) in student_subset and so on.
Akzeptierte Antwort
Siriniharika Katukam
am 25 Nov. 2019
Hi
You may find a way to sort date and time from this link below:
May be you need to change the format in "datenum"
2 Kommentare
Walter Roberson
am 25 Nov. 2019
If you switch from xlsread() to readtable() then the first variable in the table will automatically be created as datetime() objects
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!