MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

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]

247 correct solutions
83 incorrect solutions

Last solution submitted on May 22, 2015

1 Comment