Cody

Solution 2180369

Submitted on 28 Mar 2020
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   Fail
cVec = 5:-.2:-5; ref = (1/sqrt(2*pi*2.5^2))*exp((-1*cVec.^2)/(2*2.5^2)); user = MyFunc(); assert(isequal(user,ref))

xVec = Columns 1 through 17 0.0011 0.0017 0.0024 0.0035 0.0049 0.0068 0.0092 0.0123 0.0163 0.0211 0.0270 0.0339 0.0420 0.0511 0.0613 0.0724 0.0841 Columns 18 through 34 0.0962 0.1083 0.1201 0.1310 0.1406 0.1486 0.1546 0.1583 0.1596 0.1583 0.1546 0.1486 0.1406 0.1310 0.1201 0.1083 0.0962 Columns 35 through 51 0.0841 0.0724 0.0613 0.0511 0.0420 0.0339 0.0270 0.0211 0.0163 0.0123 0.0092 0.0068 0.0049 0.0035 0.0024 0.0017 0.0011

Assertion failed.

2   Pass
[xVec cVec] = MyFunc(); cRef = 5:-.2:-5; assert(isequal(cRef,cVec))

xVec = Columns 1 through 17 0.0011 0.0017 0.0024 0.0035 0.0049 0.0068 0.0092 0.0123 0.0163 0.0211 0.0270 0.0339 0.0420 0.0511 0.0613 0.0724 0.0841 Columns 18 through 34 0.0962 0.1083 0.1201 0.1310 0.1406 0.1486 0.1546 0.1583 0.1596 0.1583 0.1546 0.1486 0.1406 0.1310 0.1201 0.1083 0.0962 Columns 35 through 51 0.0841 0.0724 0.0613 0.0511 0.0420 0.0339 0.0270 0.0211 0.0163 0.0123 0.0092 0.0068 0.0049 0.0035 0.0024 0.0017 0.0011