Cody

Solution 1753746

Submitted on 18 Mar 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
x=linspace(0,1,50)'; y=4*x-1+ randn(50,1); % perturbed observations sol = Lls2(x,y) assert(abs(sum(Lls2(x,y))-4+1)<2)

ans = '9.5.0.1049112 (R2018b) Update 3'

Undefined function 'fminunc' for input arguments of type 'function_handle'. Error in Lls2 (line 5) sol = fminunc(f,sol); Error in Test1 (line 3) sol = Lls2(x,y)

2   Fail
x=linspace(0,1,50)'; y=7*x+45+ randn(50,1); % perturbed observations sol = Lls2(x,y) assert(abs(sum(Lls2(x,y))-7-45)<2)

ans = '9.5.0.1049112 (R2018b) Update 3'

Undefined function 'fminunc' for input arguments of type 'function_handle'. Error in Lls2 (line 5) sol = fminunc(f,sol); Error in Test2 (line 3) sol = Lls2(x,y)