Cody

Solution 1721828

Submitted on 6 Feb 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
a = 1; b= 1; c=1; d=1969; vec=[1 1 1]; y_correct = false; assert(isequal(parallel2plane(a,b,c,d,vec),y_correct))

Error using * Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second matrix. To perform elementwise multiplication, use '.*'. Error in parallel2plane (line 2) if vec*[a b c] Error in Test1 (line 7) assert(isequal(parallel2plane(a,b,c,d,vec),y_correct))

2   Fail
a = 1; b= 1; c=1; d=1969; vec=[0 -1492 1492]; y_correct = true; assert(isequal(parallel2plane(a,b,c,d,vec),y_correct))

Error using * Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second matrix. To perform elementwise multiplication, use '.*'. Error in parallel2plane (line 2) if vec*[a b c] Error in Test2 (line 7) assert(isequal(parallel2plane(a,b,c,d,vec),y_correct))

3   Fail
a = 1; b= 2; c=3; d=1969; vec=[0 -1492 1492]; y_correct = false; assert(isequal(parallel2plane(a,b,c,d,vec),y_correct))

Error using * Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second matrix. To perform elementwise multiplication, use '.*'. Error in parallel2plane (line 2) if vec*[a b c] Error in Test3 (line 7) assert(isequal(parallel2plane(a,b,c,d,vec),y_correct))

4   Fail
a = 1; b= 2; c=3; d=1969; vec=[1 0 -1/3]; y_correct = true; assert(isequal(parallel2plane(a,b,c,d,vec),y_correct))

Error using * Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second matrix. To perform elementwise multiplication, use '.*'. Error in parallel2plane (line 2) if vec*[a b c] Error in Test4 (line 7) assert(isequal(parallel2plane(a,b,c,d,vec),y_correct))

5   Fail
a = 0; b= 5; c=7; d=1969; vec=[0 49 -35]; y_correct = true; assert(isequal(parallel2plane(a,b,c,d,vec),y_correct))

Error using * Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second matrix. To perform elementwise multiplication, use '.*'. Error in parallel2plane (line 2) if vec*[a b c] Error in Test5 (line 7) assert(isequal(parallel2plane(a,b,c,d,vec),y_correct))