Cody

Problem 1416. Find the function

Solution 720138

Submitted on 23 Aug 2015 by Peng Liu
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
%% M = [ 0.091273 0.060806 0.130562 0.076233 0.184484 0.170092 0.197685 0.244964 0.226948 0.308231 0.232963 0.309789 0.321582 0.329059 0.343480 0.384513 0.612326 0.505868 0.691264 0.529026 0.710301 0.595951 0.733409 0.637104 0.774992 0.649954 0.836475 0.717744] x = 0.881524; y_correct = 0.857148; assert(abs((new_point_fit(M,x)-y_correct)/y_correct)<=0.1)

M = 0.0913 0.0608 0.1306 0.0762 0.1845 0.1701 0.1977 0.2450 0.2269 0.3082 0.2330 0.3098 0.3216 0.3291 0.3435 0.3845 0.6123 0.5059 0.6913 0.5290 0.7103 0.5960 0.7334 0.6371 0.7750 0.6500 0.8365 0.7177

2   Pass
%% M = [ 0.016105 0.042602 0.048845 0.100409 0.135680 0.162205 0.382335 0.174843 0.409982 0.219579 0.505942 0.247533 0.535645 0.463607 0.553299 0.539963 0.562505 0.629237 0.605515 0.665519 0.609794 0.668600 0.718378 0.761209 0.803968 0.822402 0.996661 0.883440] x = 0.999173; y_correct = 0.954605; assert(abs((new_point_fit(M,x)-y_correct)/y_correct)<=0.1)

M = 0.0161 0.0426 0.0488 0.1004 0.1357 0.1622 0.3823 0.1748 0.4100 0.2196 0.5059 0.2475 0.5356 0.4636 0.5533 0.5400 0.5625 0.6292 0.6055 0.6655 0.6098 0.6686 0.7184 0.7612 0.8040 0.8224 0.9967 0.8834

3   Pass
%% M = [ 0.0705596 0.0010882 0.0880270 0.1284582 0.1557501 0.1819287 0.4294053 0.1980035 0.4354657 0.4193907 0.5222490 0.6849248 0.6131108 0.7573705 0.6277358 0.7864304 0.6678857 0.8790018] x = 0.9916796; y_correct = 0.7335639; assert(abs((new_point_fit(M,x)-y_correct)/y_correct)<=0.1)

M = 0.0706 0.0011 0.0880 0.1285 0.1558 0.1819 0.4294 0.1980 0.4355 0.4194 0.5222 0.6849 0.6131 0.7574 0.6277 0.7864 0.6679 0.8790