Add Matrix as Array element

14 次查看(过去 30 天)
Joel Biffin
Joel Biffin 2017-11-27
I currently have a large loop which generates a matrix containing probabilities generated by some algorithm. I want to, after generating such a matrix, add this to an array which will contain such probability matrices for every time the parent loop iterates. Is there such functionality in Matlab?

回答(1 个)

Walter Roberson
Walter Roberson 2017-11-27
You could also consider using a multidimensional array. Multidimensional arrays use memory more efficiently than cell arrays.
Be sure to pre-allocate the memory for the array you use, for performance reasons.

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by