How can I store tables object in an array?
15 ビュー (過去 30 日間)
古いコメントを表示
My raw data is a variable number of xy data sets (my current data has 10 sets of xy data). Each data set has a different size but the same type of data. I am performing the same function on each set. Currently I am explicitly creating a table name for each one and then repeating the same operation on each. It would be much easier if I can store all the tables in an array and loop through it.
I enjoy the convenience of referencing the data by column name..
0 件のコメント
採用された回答
Guillaume
2018 年 5 月 1 日
Option 1 is to store your tables into a cell array. You can then use explicit loops or cellfun to apply the same code to each table.
However, considering that each table have the same columns, the option I would chose would be to concatenate all the tables vertically into one, with an additional column indicating which original table each row came from. varfun or rowfun with the 'GroupingVariables' option using that column would allow to apply functions on each original data set.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Tables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!