Return an n-by-n matrix that has a, b, c as the subdiagonal, main diagonal, and superdiagonal entries in the matrix.
Example
a=1
b=2
c=3
n=5
T = [2 3 0 0 0;
1 2 3 0 0;
0 1 2 3 0;
0 0 1 2 3;
0 0 0 1 2]
Solution Stats
Problem Comments
5 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers177
Suggested Problems
-
Make the vector [1 2 3 4 5 6 7 8 9 10]
53956 Solvers
-
3990 Solvers
-
Reverse the Words (not letters) of a String
477 Solvers
-
Project Euler: Problem 10, Sum of Primes
2135 Solvers
-
Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
2156 Solvers
More from this Author1
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
did you mean n=4 and not d=4?? ;-)
it seems that the test code is broken n!=d
I fixed the test suite so that n is used instead of d.
Additional test cases have been added.
great!