How to generate block toeplitz matrix
    6 次查看(过去 30 天)
  
       显示 更早的评论
    
I want to generate a block toeplitz matrix in MATLAB, that is [A B C; B A B; C B A] , where A B and C are matrices (if they were scalars, the matlab function "toeplitz" would simply work). Does anyone have any simple way to generate such a matrix?
1 个评论
  Matt J
      
      
 2019-3-13
				leo cha's comment moved here:
I have problem,  for example 
if 
for i = 1:200
    Q(:, :, 1, i) = magic(2);
end
I would like to generate a block toeplitz matrix, where each block is Q(:, :, 1, i),
采纳的回答
  Matt J
      
      
 2015-10-16
        
      编辑:Matt J
      
      
 2015-10-16
  
      Q={A,B,C}; %blocks
n=length(Q);
result = cell2mat(Q(toeplitz(1:n)));
2 个评论
  Royi Avital
      
 2019-1-19
				
      编辑:Royi Avital
      
 2019-3-13
  
			This could be extended to assymetric case.
For instance if we want the upper triangle to be zero we can do something like:
Q = {A, B, C, Z}; %blocks
n = length(Q);
vC = 1:n;
vR = 4 * ones(n, 1); vR(1) = vC(1);
result = cell2mat(Q(toeplitz(vC, vR)));
Where Z is zeros.
更多回答(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!


