Prev: ScatterHist m file
Next: treefit maxium pruning level
From: Ahmad on 29 Nov 2009 02:12 Hi, Is there any method in Matlab to generate a BLOCK Toeplitz matrix whose structure is [a b c 0 0 0 a b c 0 0 0 a b c ] where a,b, c, and all 0's are COLUMN vectors of the same length r x 1.
From: Bruno Luong on 29 Nov 2009 07:20 "Ahmad " <aarg_2010(a)yahoo.com> wrote in message <het6s3$q5f$1(a)fred.mathworks.com>... > Hi, > > Is there any method in Matlab to generate a BLOCK Toeplitz matrix whose structure is > > [a b c 0 0 > 0 a b c 0 > 0 0 a b c ] > > where a,b, c, and all 0's are COLUMN vectors of the same length r x 1. One way: a=rand(3,2); b=rand(3,2); c=rand(3,2); abc = {a b c}; % use z = zeros(size(a)) instead to build full matrix z = sparse([], [], [], size(a,1), size(a,2)); % z = zeros(size(a)); abc = [{z} abc]; n = length(abc); s = spdiags(repmat(1:n-1,n+1,1),0:n-2,n+1,n+1); M = cell2mat(abc(s+1)) I would recommend to go back to the basic: use the SPARSE command to build the matrix from scratch. Bruno
From: Matt J on 29 Nov 2009 08:55 "Ahmad " <aarg_2010(a)yahoo.com> wrote in message <het6s3$q5f$1(a)fred.mathworks.com>... > Hi, > > Is there any method in Matlab to generate a BLOCK Toeplitz matrix whose structure is > > [a b c 0 0 > 0 a b c 0 > 0 0 a b c ] > > where a,b, c, and all 0's are COLUMN vectors of the same length r x 1. Here's another one. It's efficient in syntax, but not in execution: A=kron( speye(N), [a,b,c]); %N is number of recurrences of the blocks
From: Bruno Luong on 29 Nov 2009 09:14 "Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <hetug6$5g4$1(a)fred.mathworks.com>... > > Here's another one. It's efficient in syntax, but not in execution: > > A=kron( speye(N), [a,b,c]); %N is number of recurrences of the blocks The structure of the blocks generated like the above are disjoint like SPDIAGS, not like TOEPLITZ. Bruno
From: Bruno Luong on 29 Nov 2009 09:50
Sorry for the typo > > The structure of the blocks generated like the above are disjoint like BLKDIAG, not like TOEPLITZ. > > Bruno |