How do I create a circulant matrix of shift 3 towards the left ?
이전 댓글 표시
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
Jos (10584)
2013년 12월 16일
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?
채택된 답변
추가 답변 (2개)
A=func2mat(@(x)circshift(x,3),zeros(93,1));
Jos (10584)
2013년 12월 16일
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
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!