Cody

Problem 2896. İmage Series 2 AND

Solution 2826309

Submitted on 12 Aug 2020 by Rafael S.T. Vieira
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

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!