How to unpack contents of a cell array?

117 次查看(过去 30 天)

I have a cell array:

I try to unpack the contents of each cell:

h = size(dom_psth_tb,1);
dom_psth_tb = dom_psth_tb{1:h,1};    

But the result is the contents of only one cell:

Help is much appreciated!

采纳的回答

Stephen23
Stephen23 2018-4-25
编辑:Stephen23 2022-2-23
You can use a comma-separated list, and simply concatenate the contents into one matrix:
mat = vertcat(dom_psth_tb{:})
Read this to know more about comma-separated lists:

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Types 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by