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.
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.
MATLAB and Simulink resources for Arduino, LEGO, and Raspberry PiLearn more
Opportunities for recent engineering grads.Apply Today
New to MATLAB?Learn MATLAB today!
Play games and win prizes!Learn more