Discover MakerZone

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

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Solution 241717

Submitted on 8 May 2013 by andrea84

Correct

59Size
Leading solution size is 11.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
%%
x=[1 2 3 NaN 4 5 6];
y_correct=[1 2 5 6];
assert(isequal(NaN_window_delete(x),y_correct))
x =
     1     2     5     6
2
Pass
 
%%
x=[10 20 3 NaN 4 50 NaN 6];
y_correct=[10 20];
assert(isequal(NaN_window_delete(x),y_correct))
x =
    10    20
3
Pass
 
%%
x=[NaN 20 3 5 4 50 55 NaN];
y_correct=[3 5 4 50];
assert(isequal(NaN_window_delete(x),y_correct))
x =
     3     5     4    50
4
Pass
 
%%
x=[10 20 3 5 NaN 4 50 55 NaN 60 80 90 NaN 100 110 ];
y_correct=[10 20 3 50 80 110];
assert(isequal(NaN_window_delete(x),y_correct))
x =
    10    20     3    50    80   110