Is there any way for me to access specific matrix in the concatenate?
For example:
a = [1,2,3,4:5,6,7,8:9,0,1,2];
b = [3,2,1:4,2,1:5,6,7];
c = [a b];
I wish to access the matrix b from c..
It is very obvious that I can’t access it by c(2); because it is pointing to the second element in c instead.
I heard I could save the information of matrix a and matrix b in the header.
And then I would be able to retrieve it at a later time.
But how it works?
You can save the sizes of the
aandbarrays in a separate lengthlavector, which you can later use as index ranges to access sub-matrices fromc. This is kind of like your idea with the header, except that the header is stored as a separate variablela: