Cody

Problem 2527. Cull vector elements that contain a specified digit

Given inputs of (1) a row vector and (2) a digit, identify the elements of that vector that contain the digit, remove them, and return the remaining elements.

For example,

digitRemove([1 2 5 13 55 23 15],5) --> [1 2 13 23]

and

digitRemove([3 24 7 9 18 55 67 71],7) --> [3 24 9 18 55]

Solution Stats

68.18% Correct | 31.82% Incorrect
Last solution submitted on Apr 13, 2017

Solution Comments

Tags

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

MATLAB Academy

New to MATLAB?

Learn MATLAB today!