can anybody please help me to define this?

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)

Special? Not really.
help diag

2 Comments

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.
Thanks Steven Lord that (spdiags) was the function I was looking for

Sign in to comment.

Products

Release

R2017a

Tags

Asked:

on 13 May 2020

Commented:

on 14 May 2020

Community Treasure Hunt

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

Start Hunting!