How to create code for toeplitz matrix

1 visualización (últimos 30 días)
Telema Harry
Telema Harry el 10 de Mzo. de 2021
Comentada: Telema Harry el 10 de Mzo. de 2021
I have Y = [1,2,3,4] and I want to create
YY =
[1 2 3 4
2 1 2 3
3 2 1 2
4 3 2 1]
YY = toeplitz (Y(1,1:4)) can easily give me this result. However, I will like to create my own code.
I will appreciate any help.

Respuesta aceptada

Tesfaye Girma
Tesfaye Girma el 10 de Mzo. de 2021
fipref('NumericTypeDisplay','short');
format short g
a = fi([1 2 3],true,8,5)
b = fi([1 4 8],true,16,10)
toeplitz(a,b)
  1 comentario
Telema Harry
Telema Harry el 10 de Mzo. de 2021
Thank you for your response. Can one do this using a for loop ?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Multidimensional Arrays en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by