mulDimArray2table函数将AxBxCx… 形式的多维(最多10维)MATLAB数组转换为维度索引的单独列。
mulDimArray2table function converts a multi-dimensional MATLAB array of form AxBxCx… up to 10 dimensions to a MATLAB table with dimension indices as separate columns for identification.
该函数的实现使用递归和for循环。
The current implementation of the function uses recursion and a for loop.
结果存储的变量在每次迭代中改变大小。
The results storage variable changes size on each iteration.
可以考虑对存储变量进行空间预分配。
It might be possible to pre-allocate the storage variable.
此外,基于MATLAB的ind2sub函数的更有效实现也是可能的。
Moreover, a more efficient implementation based on MATLAB’s ind2sub function might be possible.