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

Learn moreOpportunities for recent engineering grads.

Apply TodayGiven an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. This must be done in less than half the time that repmat(x, m, n) takes. This is the sequel to http://www.mathworks.com/matlabcentral/cody/problems/1237-it-s-race-time-write-a-faster-function-than-the-test-suite-call-of-unique.

Example: Input: repl_mat(2, 2, 5) Output: [2, 2, 2, 2, 2; 2, 2, 2, 2, 2];

32 correct solutions
116 incorrect solutions

Last solution submitted on Jan 22, 2016

1 Comment