Shifting elements and replacing empty places with zeros

1 visualización (últimos 30 días)
Ritu Giri
Ritu Giri el 24 de Ag. de 2023
Comentada: Matt J el 29 de Ag. de 2023
How to convert matrix A =[3 ,7, 9, 2] to matrix B = [3, 7, 9, 2; 0, 3, 9, 2; 0, 0, 3, 9; 0, 0, 0, 3] using matlab

Respuesta aceptada

Matt J
Matt J el 24 de Ag. de 2023
Editada: Matt J el 24 de Ag. de 2023
The B that you have provided is not what the title of your post describes. I assume you meant the following,
A =[3 ,7, 9, 2];
B=toeplitz([A(1),zeros(1,numel(A)-1)],A)
B = 4×4
3 7 9 2 0 3 7 9 0 0 3 7 0 0 0 3
  5 comentarios
Ritu Giri
Ritu Giri el 29 de Ag. de 2023
Can you please on that?
Matt J
Matt J el 29 de Ag. de 2023
No, because that would probably be a homework problem.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical 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