How to loop through subsets of series in a database
2 views (last 30 days)
Show older comments
I have a data file (csv) with 20 time series, and I need to loop through all possible subsets of 5 time series within this set, inputting the five series in a database, carry out some operations on them, then clear the database and select the next subset of 5 series, and so on until all combinations of 5 series have been exhausted.
What is the best way to do this? Presumably some sort of a for loop, but is there a ready made function in matlab for this? A complication is that the 5 series in a given database need to be different, ie I cannot have a subset where two or more of the series are the same. Hence I cannot just loop through all series in a sequence of for loops.
Any help much appreciated thanks!
4 Comments
per isakson
on 6 Jun 2015
Edited: per isakson
on 6 Jun 2015
- "names of series"   are the names column headers in the csv-file? Show a few rows of the csv-file
- "ready made function"   I guess you need to write a short script
- if you have R2013b or later, see readtable, Create table from file and Tables, Arrays in tabular form whose named columns can have different types
Answers (0)
See Also
Categories
Find more on Logical 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!