Cody

Solution 748481

Submitted on 28 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
%% Example 1 EnableSE(1) a = rand(3)+(1:3)

a = 1.1677 2.6472 3.0590 1.8412 2.3152 3.6762 1.6415 2.3573 3.9979

2   Pass
%% Example 2 EnableSE(0) try a = magic(3)+(1:3); catch ME getReport(ME,'basic') end

ans = Error using + Matrix dimensions must agree.

3   Pass
%% find a supported function EnableSE(1) yf = yourFcn(1); x = rand(1e2); y = rand(1e2,1); assert(~isequal(yf(x,y),x+y)&&isequal(yf(x,y),bsxfun(yf,x,y)))

4   Pass
%% find an unsupported function EnableSE(1) yf = yourFcn(0); x = rand(1e2); y = rand(1,1e2); z = bsxfun(yf,x,y); try d = yf(x,y); catch ME1 end assert(exist('ME1','var')>0)