You cannot do that. Once you construct matrix = [A B C D] then MATLAB throws away all information about how the matrix was constructed. It does not know afterwards, for example, whether matrix = [1,2,3] was used, or matrix = [1, [2 3]] or matrix = [[1,2],3] or matrix = [[1,2,3]] . There is no (realistic) way to take matrix and ask MATLAB "what was the first parameter of the horzcat() that was used to create this matrix?"
If you need to be able to decompose later, then use cell arrays:
but this will not act like a numeric array. In places where you need it to act like a numeric array you could use cell2mat(matrix) to get it to construct [A, B, C, D] but that's a nuisance.
Best Answer