How to create code for toeplitz matrix

조회 수: 3 (최근 30일)
Telema Harry
Telema Harry 2021년 3월 10일
댓글: Telema Harry 2021년 3월 10일
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.

채택된 답변

Tesfaye Girma
Tesfaye Girma 2021년 3월 10일
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
Telema Harry
Telema Harry 2021년 3월 10일
Thank you for your response. Can one do this using a for loop ?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by