Cody

Solution 1817957

Submitted on 16 May 2019 by Zoltán Nagy
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
x = 5*ones(2,3); y_correct = logical(1); assert(isequal(checkIfequal(x),y_correct))

k = 0

2   Pass
x = magic(4); y_correct = logical(0); assert(isequal(checkIfequal(x),y_correct))

k = 120

3   Pass
x = zeros(4,4,4); y_correct = logical(1); assert(isequal(checkIfequal(x),y_correct))

k(:,:,1) = 0 k(:,:,2) = 0 k(:,:,3) = 0 k(:,:,4) = 0

4   Pass
x = randn(3,3,3,3); y_correct = logical(0); assert(isequal(checkIfequal(x),y_correct))

k(:,:,1,1) = -2.4071 k(:,:,2,1) = -3.7972 k(:,:,3,1) = -3.5923 k(:,:,1,2) = -3.1480 k(:,:,2,2) = -3.6198 k(:,:,3,2) = -3.7409 k(:,:,1,3) = -4.4119 k(:,:,2,3) = -3.8695 k(:,:,3,3) = -3.8032