matrix with multiple matrices
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
Jan
2012-7-7
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.
回答(2 个)
Image Analyst
2012-7-7
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.
0 个评论
Jan
2012-7-7
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.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!