Cody

Solution 1912147

Submitted on 26 Aug 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
x=[1 1 ; 3 0 ; 1 1]; y=[5 3]; y_correct=[1 1 ; 1.5 0.75 ; 2 0.5 ; 2.5 0.25 ; 3 0 ; 2 0.5 ; 1 1]; assert(all(all(abs(tracers(x,y)-y_correct)<1e-9)))

xx = 1 3 vv = 1 0 R = 1.0000 0.7500 0.5000 0.2500 0

Matrix dimensions must agree. Error in Test1 (line 4) assert(all(all(abs(tracers(x,y)-y_correct)<1e-9)))

2   Fail
x=[1 1 ; 2 3 ; 4 2 ; 5 -2]; y=[6 5 3]; y_correct=[1 1 ; 1.2 1.4 ; 1.4 1.8 ; 1.6 2.2 ; 1.8 2.6 ; 2 3 ; 2.5 2.75 ; 3 2.5 ; 3.5 2.25 ; 4 2 ; 4.5 0 ; 5 -2]; assert(all(all(abs(tracers(x,y)-y_correct)<1e-9)))

xx = 1 2 vv = 1 3 R = 1.0000 1.4000 1.8000 2.2000 2.6000 3.0000

Matrix dimensions must agree. Error in Test2 (line 4) assert(all(all(abs(tracers(x,y)-y_correct)<1e-9)))

3   Fail
a=ceil(100*rand)+10; x=[0 0 ; a a]; y=a+1; y_correct=[0:a ; 0:a]'; assert(all(all(abs(tracers(x,y)-y_correct)<1e-9)))

xx = 0 35 vv = 0 35 R = Columns 1 through 18 0 1.0000 2.0000 3.0000 4.0000 5.0000 6.0000 7.0000 8.0000 9.0000 10.0000 11.0000 12.0000 13.0000 14.0000 15.0000 16.0000 17.0000 Columns 19 through 36 18.0000 19.0000 20.0000 21.0000 22.0000 23.0000 24.0000 25.0000 26.0000 27.0000 28.0000 29.0000 30.0000 31.0000 32.0000 33.0000 34.0000 35.0000

Matrix dimensions must agree. Error in Test3 (line 5) assert(all(all(abs(tracers(x,y)-y_correct)<1e-9)))