Circulant Matrix [Column Wise Traversal]
이전 댓글 표시
Below is the row wise circulant matrix algorithm :
function C= circulant(x)
n=length(x);
C=zeros(n,n);
C(1,:)=x;
for i=2:n
C(i, :)=[C(i-1, n) C(i-1, 1:n-1)];
end
How can I compute the circulant matrix column wise based on what I wrote for the circulant matrix computed row wise?
댓글 수: 4
madhan ravi
2020년 9월 18일
circshift() ?
Rik
2020년 9월 20일
Circulant Matrix [Column Wise Traversal]
Below is the row wise circulant matrix algorithm :
function C= circulant(x)
n=length(x);
C=zeros(n,n);
C(1,:)=x;
for i=2:n
C(i, :)=[C(i-1, n) C(i-1, 1:n-1)];
end
How can I compute the circulant matrix column wise based on what I wrote for the circulant matrix computed row wise?
Rik
2020년 9월 20일
Tarek, removing you question and comments is very rude. I have restored some of your posts from the cache that Google creates. Why did you remove it? Are you afraid to be caught cheating? There is a reason you can't delete a question once you get an answer: people put in time to understand your problem, find a solution, and post it. The curteous thing to is to leave it up so future people with a similar problem can benefit from that time investment as well.
Rena Berman
2020년 10월 8일
(Answers Dev) Restored edit
채택된 답변
추가 답변 (3개)
Matt J
2020년 9월 18일
function C= circulant(x)
n=length(x);
C=zeros(n,n);
C(1,:)=x;
for i=2:n
C(i, :)=[C(i-1, n) C(i-1, 1:n-1)];
end
C=C.';
댓글 수: 1
Rik
2020년 9월 20일
Deleted comment by by Tarek Hajj Shehadi:
Hello, The thing I was trying to make columnwise computation and the rowwise computation of the circulant matrix output the same matrix where in both cases, the entries are in same position so the problem I am encountering is perhaps in the for loop.
Bruno Luong
2020년 9월 19일
function C= circulant(x)
n = length(x);
C = x(mod((1:n)'-(1:n),n)+1);
Bruno Luong
2020년 9월 18일
function C= circulant(x)
toeplitz(x,circshift(flip(x),1))
end
댓글 수: 1
Rik
2020년 9월 20일
Deleted comment by by Tarek Hajj Shehadi:
I wish to write the algorithm using for loops and not use the builtin function.
카테고리
도움말 센터 및 File Exchange에서 Mathematics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!