Cody

Problem 413. Back to basics 23 - Triangular matrix

Created by Alan Chalker in Community

Covering some basic topics I haven't seen elsewhere on Cody.

Given an input matrix, return a matrix with all elements above and to the right of the main diagonal set to zero. Example:

input = [ 1 1 1 1; 1 1 1 1; 1 1 1 1; 1 1 1 1]
output = [1 0 0 0; 1 1 0 0; 1 1 1 0; 1 1 1 1]

Solution Stats

63.99% Correct | 36.01% Incorrect
Last solution submitted on Jul 15, 2019

Problem Comments

Solution Comments