Build a Block matrix

조회 수: 9 (최근 30일)
hdr mhr
hdr mhr 2013년 2월 24일
Hi I have an nxn matrix called C_mx which is initialized by ones(n). I want to build a block matrix C_holder to hold twenty of these nxn matrices, five in each row (4 rows). I have twenty pair of variables that contribute to calculating C_mx. I run a for loop to calculate C_mx or each pair and I would like to store the calculated C_mx in C_holder every time. Say for the first pair, C_mx is calculated and placed in C_holder as the first block matrix. What I would also like to be able do, is that after generating C_holder for all C_mx's, I want to be able to extract let say, the 4th C_mx from C_holder. In another world, is there any way that I can index this C_holder like a 4x5 matrix, where each index refers to one of the C_mx's, so that I can point out to that specific index to get the C_mx that I want and and do my calculation? I hope I was able to clearly state what I want to do.
Thank you
  댓글 수: 1
Image Analyst
Image Analyst 2013년 2월 24일
Did you ever think that an example with actual sample matrices might help illustrate your question?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by