Create Banded Matrix in MATLAB - Step-by-Step Guide

  • Thread starter Thread starter Huumah
  • Start date Start date
  • Tags Tags
    Matlab Matrix
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 3K views
Huumah
Messages
27
Reaction score
0
28eC1QV.png


I'm trying to make a banded matrix in MATLAB like the one in my picture.

I'm trying to use the spdiags function but I'm not going even close to getting the same matrix.

I have tried the help in Matlab but have had no luck yet.

How can you tell the bandwidth is 7?
 
Last edited:
Physics news on Phys.org
Can you explain in more details what you have tried?

And the bandwith here is 5.