I am trying to create the following Matrix without the use of a for loop.(adsbygoogle = window.adsbygoogle || []).push({});

1 2 1 0 0 0 0 0 0 0 0 0

0 0 1 2 1 0 0 0 0 0 0 0

0 0 0 0 1 2 1 0 0 0 0 0

0 0 0 0 0 0 1 2 1 0 0 0

Etc.

Is there a simple way of doing this

Edit: Using Matlab

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Nearly diagonal matrix

Loading...

Similar Threads for Nearly diagonal matrix |
---|

Mathematica Summing matrix components |

Mathematica Eigenvectors 4x4 Matrix in Mathematica |

**Physics Forums | Science Articles, Homework Help, Discussion**