Cody

Solution 1764416

Submitted on 27 Mar 2019 by Oliver Waddington
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
x = [10 100 1000]; y_correct = [1.30 2.61 3.91]; assert(isequal(logarithms(x),y_correct))

a = 1 2 3 b = 2.3026 4.6052 6.9078 y = 1.3000 2.6100 3.9100

2   Pass
x = [50 1.2 4567; 200 67 820];; y_correct = [2.21 0.10 4.77; 3 2.38 3.8]; assert(isequal(logarithms(x),y_correct))

a = 1.6990 0.0792 3.6596 2.3010 1.8261 2.9138 b = 3.9120 0.1823 8.4266 5.2983 4.2047 6.7093 y = 2.2100 0.1000 4.7700 3.0000 2.3800 3.8000

3   Pass
x = [0.5 1.2 4.5; 23 33 3.3]; y_correct = [-0.39 0.1 0.85; 1.77 1.98 0.68]; assert(isequal(logarithms(x),y_correct))

a = -0.3010 0.0792 0.6532 1.3617 1.5185 0.5185 b = -0.6931 0.1823 1.5041 3.1355 3.4965 1.1939 y = -0.3900 0.1000 0.8500 1.7700 1.9800 0.6800