MATLAB: What is the Fastest way to write the following algorithm

Bioinformatics ToolboxCDMA Reference Blocksetdigital signal processingimage processingMATLABMATLAB and Simulink Student Suitestatistics

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

Best Answer

A=cell(1,5)
A=cellfun(@(x) randi(10,256,256,10),A,'un',0) % ---Example----
B=cat(3,A{:});