Cody

Solution 1995339

Submitted on 29 Oct 2019 by Atsushi Ueno
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
theta = 2*pi; x_correct = [1; 1]; assert(sum(abs((solve_lin(theta)-x_correct)))< 1e-5)

c = 1 s = -2.4493e-16 A = 1.0000 -0.0000 0.0000 1.0000 x = 1.0000 1.0000

2   Pass
theta = pi; x_correct = [-1; -1]; assert(sum(abs((solve_lin(theta)-x_correct)))< 1e-5)

c = -1 s = 1.2246e-16 A = -1.0000 0.0000 -0.0000 -1.0000 x = -1.0000 -1.0000

3   Pass
theta = -0.5; x_correct = [1.357;0.3982]; assert(sum(abs((solve_lin(theta)-x_correct)))< 1e-4)

c = 0.8776 s = -0.4794 A = 0.8776 -0.4794 0.4794 0.8776 x = 1.3570 0.3982