Cody

Solution 2140451

Submitted on 25 Feb 2020 by William
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
input1 = 2; %x input2 = 2; %y form = 'r2p'; output1 = 2.8284; output2 = 45; output = [output1;output2]; assert(isequal(round(complexConverter(input1, input2, form),4),output))

2   Pass
input1 = 3; %radius input2 = 60; %degrees form = 'p2r'; output1 = 1.5000; output2 = 2.5981; output = [output1;output2]; assert(isequal(round(complexConverter(input1, input2, form),4),output))

3   Pass
input1 = 3; %x input2 = -4; %y form = 'r2p'; output1 = 5.0000; output2 = 306.8699; output = [output1;output2]; assert(isequal(round(complexConverter(input1, input2, form),4),output))

4   Pass
input1 = 7; %radius input2 = 225; %degrees form = 'p2r'; output1 = -4.9497; output2 = -4.9497; output = [output1;output2]; assert(isequal(round(complexConverter(input1, input2, form),4),output))