Column Circulant Matrix

Hello,
How to create the following coulumn circulant matrix in matlab:
X=
[
x_0 x_{p-1} .... x_{P-L}
x_1 x_0 .... x_{P-L+1}
.
.
.
x_{p-1} x_{p-2} ... x_{P-L-1}
]
where p>L and both are positive integers.
Thanks

답변 (1개)

Honglei Chen
Honglei Chen 2012년 3월 8일

0 개 추천

gallery('circul',[1 2 3])'
You can then take the first L columns

댓글 수: 4

S. David
S. David 2012년 3월 8일
May be I was not clear. I have the first column, but I need to create the whole matrix using it. The question is how? Thanks
Honglei Chen
Honglei Chen 2012년 3월 8일
Just pass your first column in the place of [1 2 3] in the above code and see what the output is. The last transpose should restore your circulant matrix on columns.
S. David
S. David 2012년 3월 15일
Ok, good. Now how can I control the number of column's circular shifts? I mean, I do not want the circulant matrix to be square. For example, say I want something like:
X=[
1 5 4
2 1 5
3 2 1
4 3 2
5 4 3
]
Thanks.
S. David
S. David 2012년 3월 15일
Very simple
x=[1 2 3 4 5];
P=gallery('circul',x)';
G=P(:,1:3);

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

질문:

2012년 3월 8일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by