필터 지우기
필터 지우기

How do I generate a given Matrix in one command?

조회 수: 1 (최근 30일)
Jacob Andréasson
Jacob Andréasson 2019년 11월 7일
편집: Walter Roberson 2019년 11월 10일
I have to generate a matrix
A=[1 8 0 0 0 0;-1 2 8 0 0 0;0 -1 3 8 0 0; 0 0 -1 4 8 0;0 0 0 -1 5 8;0 0 0 0 -1 6
] writing a single command. How do i solve this exercise in best way?

답변 (1개)

Daniel M
Daniel M 2019년 11월 7일
T = toeplitz([1 -1 0 0 0 0],[1 8 0 0 0 0])+diag(0:5)
  댓글 수: 2
Jacob Andréasson
Jacob Andréasson 2019년 11월 7일
Thank you so much!!!!
John D'Errico
John D'Errico 2019년 11월 7일
Please try to not do homework assignments for people. Guide them to a solution if you wish. But just doing their homework teaches them nothing but that they can use answers to have their work done for them.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by