Cody

Solution 1704998

Submitted on 9 Jan 2019 by Athi
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
%test 2 A=imread('http://www.mathworks.com/matlabcentral/profiles/3374772.jpg'); A=rgb2gray(A); A=A(3:20,40:45); g=12; d=[ 0 4 8 12] assert(isequal(unique(image_and(A,g)),d))

d = 0 4 8 12

2   Pass
%test 3 A=imread('http://www.mathworks.com/matlabcentral/profiles/3374772.jpg'); A=rgb2gray(A); g=255; d=A; assert(isequal(image_and(A,g),d))

3   Pass
%test 4 A=imread('http://www.mathworks.com/matlabcentral/profiles/3374772.jpg'); A=rgb2gray(A); g=0; d=0*A; assert(isequal(image_and(A,g),d))

Suggested Problems

More from this Author21