Cody

# Problem 1809. 05 - Vector Equations 1

Solution 1944509

Submitted on 20 Sep 2019
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))

cVec = Columns 1 through 18 5.0000 4.8000 4.6000 4.4000 4.2000 4.0000 3.8000 3.6000 3.4000 3.2000 3.0000 2.8000 2.6000 2.4000 2.2000 2.0000 1.8000 1.6000 Columns 19 through 36 1.4000 1.2000 1.0000 0.8000 0.6000 0.4000 0.2000 0 -0.2000 -0.4000 -0.6000 -0.8000 -1.0000 -1.2000 -1.4000 -1.6000 -1.8000 -2.0000 Columns 37 through 51 -2.2000 -2.4000 -2.6000 -2.8000 -3.0000 -3.2000 -3.4000 -3.6000 -3.8000 -4.0000 -4.2000 -4.4000 -4.6000 -4.8000 -5.0000 c = Columns 1 through 18 25.0000 23.0400 21.1600 19.3600 17.6400 16.0000 14.4400 12.9600 11.5600 10.2400 9.0000 7.8400 6.7600 5.7600 4.8400 4.0000 3.2400 2.5600 Columns 19 through 36 1.9600 1.4400 1.0000 0.6400 0.3600 0.1600 0.0400 0 0.0400 0.1600 0.3600 0.6400 1.0000 1.4400 1.9600 2.5600 3.2400 4.0000 Columns 37 through 51 4.8400 5.7600 6.7600 7.8400 9.0000 10.2400 11.5600 12.9600 14.4400 16.0000 17.6400 19.3600 21.1600 23.0400 25.0000 xVec = Columns 1 through 18 0.0216 0.0253 0.0294 0.0339 0.0389 0.0444 0.0503 0.0566 0.0633 0.0703 0.0777 0.0852 0.0929 0.1007 0.1083 0.1159 0.1231 0.1300 Columns 19 through 36 0.1364 0.1422 0.1473 0.1516 0.1550 0.1575 0.1591 0.1596 0.1591 0.1575 0.1550 0.1516 0.1473 0.1422 0.1364 0.1300 0.1231 0.1159 Columns 37 through 51 0.1083 0.1007 0.0929 0.0852 0.0777 0.0703 0.0633 0.0566 0.0503 0.0444 0.0389 0.0339 0.0294 0.0253 0.0216

Assertion failed.

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

cVec = Columns 1 through 18 5.0000 4.8000 4.6000 4.4000 4.2000 4.0000 3.8000 3.6000 3.4000 3.2000 3.0000 2.8000 2.6000 2.4000 2.2000 2.0000 1.8000 1.6000 Columns 19 through 36 1.4000 1.2000 1.0000 0.8000 0.6000 0.4000 0.2000 0 -0.2000 -0.4000 -0.6000 -0.8000 -1.0000 -1.2000 -1.4000 -1.6000 -1.8000 -2.0000 Columns 37 through 51 -2.2000 -2.4000 -2.6000 -2.8000 -3.0000 -3.2000 -3.4000 -3.6000 -3.8000 -4.0000 -4.2000 -4.4000 -4.6000 -4.8000 -5.0000 c = Columns 1 through 18 25.0000 23.0400 21.1600 19.3600 17.6400 16.0000 14.4400 12.9600 11.5600 10.2400 9.0000 7.8400 6.7600 5.7600 4.8400 4.0000 3.2400 2.5600 Columns 19 through 36 1.9600 1.4400 1.0000 0.6400 0.3600 0.1600 0.0400 0 0.0400 0.1600 0.3600 0.6400 1.0000 1.4400 1.9600 2.5600 3.2400 4.0000 Columns 37 through 51 4.8400 5.7600 6.7600 7.8400 9.0000 10.2400 11.5600 12.9600 14.4400 16.0000 17.6400 19.3600 21.1600 23.0400 25.0000 xVec = Columns 1 through 18 0.0216 0.0253 0.0294 0.0339 0.0389 0.0444 0.0503 0.0566 0.0633 0.0703 0.0777 0.0852 0.0929 0.1007 0.1083 0.1159 0.1231 0.1300 Columns 19 through 36 0.1364 0.1422 0.1473 0.1516 0.1550 0.1575 0.1591 0.1596 0.1591 0.1575 0.1550 0.1516 0.1473 0.1422 0.1364 0.1300 0.1231 0.1159 Columns 37 through 51 0.1083 0.1007 0.0929 0.0852 0.0777 0.0703 0.0633 0.0566 0.0503 0.0444 0.0389 0.0339 0.0294 0.0253 0.0216

Assertion failed.