What is the Fastest way to write the following algorithm

1 次查看(过去 30 天)
I have a cell array y={1X5} each cell contains 256*256*10(3rd dimension will vary for each cell) 3D vectors. My need is to convert the cell array to matrix of the form 256*256*100. Could anyone please help me to write the fastest simple code. Thanks

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2016-8-7
编辑:Azzi Abdelmalek 2016-8-7
A=cell(1,5)
A=cellfun(@(x) randi(10,256,256,10),A,'un',0) % ---Example----
B=cat(3,A{:});
  2 个评论
Walter Roberson
Walter Roberson 2016-8-8
The first two lines of it create random data of the proper size, for the sake of illustrating the third line which is the line you need to use on your own cell array.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Event Functions 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by