How to create a circulant matrix column wise?

8 visualizaciones (últimos 30 días)
ANJANA K P
ANJANA K P el 3 de Nov. de 2020
Editada: KSSV el 3 de Nov. de 2020
I want to create M x L circulant matrix column wise,where M=16 and L=20.

Respuesta aceptada

Ameer Hamza
Ameer Hamza el 3 de Nov. de 2020

Más respuestas (2)

KSSV
KSSV el 3 de Nov. de 2020
  2 comentarios
ANJANA K P
ANJANA K P el 3 de Nov. de 2020
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 el 3 de Nov. de 2020
Editada: KSSV el 3 de Nov. de 2020
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

Iniciar sesión para comentar.


Bruno Luong
Bruno Luong el 3 de Nov. de 2020
col = rand(16,1) % your 1-column vector
A = toeplitz(col,col(mod((1:20)-1,end)+1))

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by