cell2mat

Transform a cell array containing matrices into a single, concatenated matrix.

📝 Syntax

  • M = cell2mat(ce)

📥 Input argument

  • ce - a cell.

📤 Output argument

  • M - array.

📄 Description

M = cell2smat(ce) creates a single matrix by merging all elements within the cell array ce into a multi-dimensional array. The elements in c can consist of numeric, logical, or character matrices, cell arrays, or structs, and they must be compatible for concatenation using cat function.

💡 Example

C = {[10], [20 30 40]; [90; 50], [60 76 88; 110 111 112]};
 M = cell2mat(C)

🔗 See also

cell, struct, struct2cell.

🕔 History

Version
📄 Description

1.0.0

initial version

Last updated

Was this helpful?