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

Problem 824. Set the array elements whose value is 13 to 0

Created by Aurelien Queffurust

Input A either an array or a vector (which can be empty)

Output B will be the same size as A . All elements of A equal to 13 (if any) must be replaced by zero.

For example:

A = [15 13 3]

output B is:

B= [15 0 3]

The difficulty in this problem is that the following commands FOR , WHILE , FIND and IND2SUB cannot be used.

Problem Group

Solution Statistics

172 correct solutions 100 incorrect solutions
Last solution submitted on Sep 10, 2014