How to create a circulant matrix column wise?

조회 수: 8 (최근 30일)
ANJANA K P
ANJANA K P 2020년 11월 3일
편집: KSSV 2020년 11월 3일
I want to create M x L circulant matrix column wise,where M=16 and L=20.

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 11월 3일

추가 답변 (2개)

KSSV
KSSV 2020년 11월 3일
  댓글 수: 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일
col = rand(16,1) % your 1-column vector
A = toeplitz(col,col(mod((1:20)-1,end)+1))

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by