matrix with multiple matrices

1 visualización (últimos 30 días)
ahmad
ahmad el 7 de Jul. de 2012
hello all,
I have the following example
c1 c11 c111 c11' c111' c111......
c2 c22 c222 c22' c222' c222....
.....
ci cii ciii cii' ciii' ......
and so on where c1 is like a pointer for c11 and c111, and c11 is like a pointer for c11' c111' .... c111 is also a pointer for c11''.... and so on, the form of the above example is like pointers of pointers of pointers... in c, can you help me how to make a function to represent it as a matrix form ???
Thank you for your help
  3 comentarios
ahmad
ahmad el 7 de Jul. de 2012
hello
it is not a real pointer, it looks like a pointer in c/c++ programming my question is that i need to make a function that has the following data and put them in a way of matrix of matrices where for example the value c1 represent another matrix which contain c11 c111, and c11 represent also another matrix which is c11'' c111'' etc... and so on, in this way it will look like a pointer as in c/c++ programming
Jan
Jan el 7 de Jul. de 2012
The explanation, that a "pointer looks like a pointer" is not helpful. I cannot imagine what a "matrix of matrices" could be also. As long as I do not know what "c11 c111" is, I cannot know, how they could be represented by c1. The quotes behind C11'' are not explained in addition. And finally no point in your question reminds me to a C++ pointer, which is simply a memory address.
I suggest either to post a handmade example or to describe the purpose of this structure.

Iniciar sesión para comentar.

Respuestas (2)

Image Analyst
Image Analyst el 7 de Jul. de 2012
Does the quote mean transpose? If so are the c square or rectangular? In general you can stitch together matrices horizontally like this:
wideMatrix = [a b c d e f];
or vertically:
tallMatrix = [a; b; c; d; e; f];
Of course the size of the dimensions have to match up along the stitching edge.

Jan
Jan el 7 de Jul. de 2012
I guess you could mean a nested cell:
C = {{{1, 2}, {3, 4}}, {{5, 6}, {7, 8}}}
disp(C{1}{2})
But I do see only a very vague connection to the provided information.

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by