How can I convert several tables into cell arrays
4 ビュー (過去 30 日間)
古いコメントを表示
Hi :)
I have 6 tables in my workspace and I want to convert them all into cell arrays.
Is this possilble by a loop for example? I dont want to convert every table in an extra step
Thx :)
10 件のコメント
Stephen23
2019 年 3 月 31 日
編集済み: Stephen23
2019 年 3 月 31 日
As dpb and Guillaume have already mentioned, don't stick meta-data (e.g. numbers, test-case names, parameter values, etc) into your variable names (unless you want to force yourself into writing slow, complex, buggy code that is hard to debug). Just use indexing. Indexing is simple and very efficient.
"The datasets came as csv files."
Then just follow the MATLAB documentation examples for importing multiple files:
Import the data as a numeric array or a table or whatever works best, and simply store them in one cell array using indexing:
"How can I convert several tables into cell arrays"
It is unlikely that this is necessary or even a good way to achieve your goal. Just access the data directly from the table (in the cell array).
回答 (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!