How to create an Nn x Nn matrix from N number of matrices of n x n size each?
    조회 수: 8 (최근 30일)
  
       이전 댓글 표시
    
Here Xv is a 3x3 size matrix, A is a 3x3 matrix and samples = 1000 . I wish to create a 3000X3000 size matrix sigma by taking product of Xv and A and then putting the so obtained 3x3 matrix into the huge matrix of this form. I was trying this but it didnt work.
for i=1:1:samples/3
    for j=1:1:samples/3
        if i==j
            sigma(i,j)=Xv(:,i);
        elseif i<j
            sigma(i,j)=Xv(:,i)*(A^(j-i))';
        else
            sigma(i,j)=A^(i-j)*Xv(:,i);
        end
    end
 end
댓글 수: 0
채택된 답변
  KSSV
      
      
 2022년 4월 8일
        m = fix(samples/3) ; 
signma = cell(m) ; 
for i=1:m
    for j=1:m
        if i==j
            sigma{i,j}=Xv(:,i);
         else 
            sigma{i,j}=A*Xv(:,i);
        end
    end
 end
추가 답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

