Combine variables in workspace into one table?
6 次查看(过去 30 天)
显示 更早的评论
Hi, I have a workspace that has 50+ variables I have calculated such as movmean for 9 axis of data, mov median.. etc [1048575x1 double] and I would like to combine them into one table. Or at least combine some?
Is this possible?
(I am trying to classify behaviour from the data)
Thankyou!
2 个评论
Stephen23
2018-9-6
This might be relevant:
How did you get all of those variables into the workspace?
采纳的回答
ahmed nebli
2018-9-6
编辑:Stephen23
2018-9-6
is this link helpful ?
1 个评论
Stephen23
2018-9-7
Note that this answer creates an outdated dataset array, which are not recommended. The linked page states clearly to use tables instead: "The dataset data type might be removed in a future release. To work with heterogeneous data, use the MATLAB® table data type instead. See MATLAB table documentation for more information."
更多回答(1 个)
Peter Perkins
2018-9-7
If you created those variables in the workspace, surely you could have created them in a table to begin with?
t = table();
t.SomeVarName = fun(something)
If you really have 50 variables in the workspace, then you will need to call the table constructor and list them all out as inputs. If they were in a cell array you could do this
t = table(c{:})
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!