Problem 413. Back to basics 23 - Triangular matrix
Your test suite doesn't really match the problem statement. The tests require matrices with *exactly* all elements abot the main diagonal to be 0 *and* all elements on or below the main diagonal to be 1.
Additional test cases have been added.
Running this on octave returns the correct results yet the page still says I'm wrong.
function y = triangMatrix(x)
Solution CommentsShow comments
Problem Recent Solvers929
First non-zero element in each column
Switch matrix to a column vector
Convert a Cell Array into an Array
More from this Author39
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!