Use reshape to isolate elements of kron product
    3 ビュー (過去 30 日間)
  
       古いコメントを表示
    
採用された回答
  Matt J
      
      
 2023 年 11 月 22 日
        
      編集済み: Matt J
      
      
 2023 年 11 月 22 日
  
      You can use blkReshape from this FEX download
Example:
B=ones(2);
A=[10 30;20 40];
C=kron(A,B)
C =
    10    10    30    30
    10    10    30    30
    20    20    40    40
    20    20    40    40
Cr=blkReshape(C,size(B),    [  ones(1,ndims(B)),    size(A)])
Cr(:,:,1,1) =
    10    10
    10    10
Cr(:,:,2,1) =
    20    20
    20    20
Cr(:,:,1,2) =
    30    30
    30    30
Cr(:,:,2,2) =
    40    40
    40    40
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


