How do I create a circulant matrix of shift 3 towards the left ?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Derick Wong
el 16 de Dic. de 2013
Comentada: Derick Wong
el 17 de Dic. de 2013
Hi,
Does anyone know how do I create a circulant matrix like the one I attached. The first 2 row is for the x-axis, center 2 row is for the y-axis and the last 2 row is for the z-axis. The shift from each row is 3. The x-axis started from 1st column. The y-axis started from 2nd column and the z-axis started from 3rd column.
1 comentario
Jos (10584)
el 16 de Dic. de 2013
Given your description, I fail to see how the 3rd row is looking in A. Or has A only six rows? And should it be flexible somehow?
Respuesta aceptada
Jos (10584)
el 16 de Dic. de 2013
Editada: Jos (10584)
el 16 de Dic. de 2013
Not very flexible:
A = eye(6)
A = A([1 4 2 5 3 6],:) % permute as desired
A(:,10) = 0 % add some zero columns
3 comentarios
Jos (10584)
el 16 de Dic. de 2013
You could help by stating what the third line of A should be:
A = [1 0 0 0 0 0 0 0 . . . line 1
0 0 0 1 0 0 0 0 . . . line 2
WHAT IS HERE!
0 1 0 0 0 0 0 0 line 32
Más respuestas (2)
Jos (10584)
el 16 de Dic. de 2013
It does look like a row-permuted circulant
N = 31 ;
dn = 3 ;
A = eye(dn*N) ; % circulant
ix = ones(N,d) ; % make a permution index
ix(1,:) = 1+dn*(0:N-1) ;
ix = cumsum(ix,1) ;
ix = ix.' ;
A = A(ix,:) % row-permutation
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!