Cody

Solution 553888

Submitted on 8 Jan 2015
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
%% a=1; b=1; c=1; d=1234; [v1,v2] = directionvectors(a,b,c,d); assert(sum([a b c].*(v1+[0 0 d/c]))==d); assert(sum([a b c].*(v2+[0 0 d/c]))==d); assert(dot(v1,v2)~=0);

2   Fail
%% a=0; b=5; c=7; d=1234; [v1,v2] = directionvectors(a,b,c,d); assert(sum([a b c].*(v1+[0 0 d/c]))==d); assert(sum([a b c].*(v2+[0 0 d/c]))==d); assert(dot(v1,v2)~=0);

Error: Assertion failed.