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

Learn moreOpportunities for recent engineering grads.

Apply TodayWrite code which replaces the number 1 with two NaNs.

Example

X = [ 1 2 NaN 4 1 3 7 NaN 1 4 NaN 2]

Answer Y is

[ NaN NaN 2 NaN 4 NaN NaN 3 7 NaN NaN NaN 4 NaN 2]

134 correct solutions
144 incorrect solutions

Last solution submitted on Jun 15, 2016

2 players like this problem

1 Comment

James
on 27 Nov 2012

I wrote this solution when there were multiple problems with the test suite. It's an ugly hack, and not a "real" solution. Now that the test suite is working, please ignore this solution.

13 Comments