How to create a circulant matrix column wise?

I want to create M x L circulant matrix column wise,where M=16 and L=20.

その他の回答 (2 件)

KSSV
KSSV 2020 年 11 月 3 日

0 投票

2 件のコメント

ANJANA K P
ANJANA K P 2020 年 11 月 3 日
Thank you for the response.But I am again getting a square matrix .I need the result as M x L. ie,16*20 matrix as the answer.
Thanks in Advcance.
KSSV
KSSV 2020 年 11 月 3 日
編集済み: KSSV 2020 年 11 月 3 日
Read about Circshift.
m = 16 ; n = 20 ;
r = rand(m,1) ;
iwant = zeros(m,n) ;
iwant(:,1) = r ;
for i = 2:n
iwant(:,i) = circshift(iwant(:,i-1),1) ;
end

サインインしてコメントする。

Bruno Luong
Bruno Luong 2020 年 11 月 3 日

0 投票

col = rand(16,1) % your 1-column vector
A = toeplitz(col,col(mod((1:20)-1,end)+1))

カテゴリ

ヘルプ センター および File ExchangeElementary Math についてさらに検索

質問済み:

2020 年 11 月 3 日

編集済み:

2020 年 11 月 3 日

Community Treasure Hunt

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

Start Hunting!

Translated by