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

Learn moreOpportunities for recent engineering grads.

Apply TodayFor example, if n=2 (maximum value), the output matrix should be

[1 1 1 1 1; 1 2 2 2 1; 1 2 1 2 1; 1 2 2 2 1; 1 1 1 1 1]

where you go from inside to outside starting from 1 to 2(maximum value) and again move back from 2 to 1.

35 correct solutions
22 incorrect solutions

Last solution submitted on May 28, 2015

3 Comments