Cody

# Problem 42626. UICBioE240 2.7

Solution 740954

Submitted on 21 Sep 2015 by LY Cao
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
%% x1 = 1; x2 = 1; y_correct = zeros(3,3,3); y_correct(:,:,1) = 1; y_correct(:,:,1) = 0; y_correct(:,:,1) = 1/5; assert(isequal(your_fcn_name(x),y_correct))

[Warning: Function isequal has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] a = 1

2   Pass
%% x1 = 2; x2 = 1; y_correct = zeros(3,3,3) y_correct(:,:,1) = 2; y_correct(:,:,1) = 1; y_correct(:,:,1) = 2/5; assert(isequal(your_fcn_name(x),y_correct))

y_correct(:,:,1) = 0 0 0 0 0 0 0 0 0 y_correct(:,:,2) = 0 0 0 0 0 0 0 0 0 y_correct(:,:,3) = 0 0 0 0 0 0 0 0 0 [Warning: Function isequal has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [Warning: Function isequal has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] a = 1