フィルターのクリア

Splitting Table into smaller sub-tables containing all rows

1 回表示 (過去 30 日間)
Giwrgos Navrozidis
Giwrgos Navrozidis 2020 年 5 月 30 日
編集済み: Jan Grüner 2020 年 5 月 30 日
I have a txt file containing thousands of measurements from smart meters. On the first column there are the timestamps for each measurement and each column after that represents a smart-meter, each row contains the measurements taken every 15 minutes (the attached txt is a smaller version of my data). How do i split the bigger table into smaller tables, each containing 10 columns (representing a group of 10 smart meters)?

回答 (1 件)

Jan Grüner
Jan Grüner 2020 年 5 月 30 日
編集済み: Jan Grüner 2020 年 5 月 30 日
My Idea would be to use a datastore(). The property "VariableNames" contains a list of all column names (using the first line as header). So you can just loop through the data by using the property "SelectedVariableNames" from the 2nd column on forwards without having to load the whole file.
Using readall() you can then load the section.
By using datastore you can also manage a lot more stuff...

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by