Search excel file for specific data and then copy adjacent columns in that range
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have an excel document that has Time|data1|data2|data3 (| denotes a new column not a delimiter) and I want to create a matlab script where I can input a specific time range in the proper format that matches the excel entry and then have matlab search the spreadsheet for those bounds and copy data from both the time column and data2 columns. How do i do this?
0 Kommentare
Antworten (1)
Sara
am 6 Mai 2014
I would read in the xls file with "xlsread" (the whole set of data). Then search the first column of the imported data with the "find" command to extract the portion that interests you (your time range).
2 Kommentare
Sara
am 6 Mai 2014
Maybe you can read the file line by line? Using fopen and then fgetl, you get the current line in text format. You can then check if the current time is within your range and store only those values that meet your criteria.
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!