can anybody please help me to define this?

1 view (last 30 days)
Muhammad Asif
Muhammad Asif on 13 May 2020
Commented: Muhammad Asif on 14 May 2020
Actually I am looking for a speacial function in matlab which I can use to define this matrix. I have used it in past but now I don't remember it. It is a builtin functino to define these sort of matrices.
If anybody can help me pls...
Thanks

Answers (1)

John D'Errico
John D'Errico on 13 May 2020
Special? Not really.
help diag
  2 Comments
Steven Lord
Steven Lord on 13 May 2020
If the matrix is going to be large and all the values above and below those three diagonals are 0, consider spdiags to make this as a sparse matrix.
Muhammad Asif
Muhammad Asif on 14 May 2020
Thanks Steven Lord that (spdiags) was the function I was looking for

Sign in to comment.

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Tags

Products


Release

R2017a

Community Treasure Hunt

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

Start Hunting!