Home License -- for personal use only. Not for government, academic, research, commercial, or other organizational use. 04-Mar-2026 08:53:04 test_nls_test() MATLAB/Octave version 9.11.0.2358333 (R2021b) Update 7 Test test_nls(). p00_title_test(): p00_title() returns the title for each test. Test Title 1: "Linear function, full rank." 2: "Linear function, rank 1." 3: "Linear function, rank 1, zero columns and rows." 4: "Rosenbrock function." 5: "Helical valley function." 6: "Powell singular function." 7: "Freudenstein-Roth function." 8: "Bard function." 9: "Kowalik and Osborne function." 10: "Meyer function." 11: "Watson function." 12: "Box 3-dimensional function." 13: "Jennrich-Sampson function." 14: "Brown and Dennis function." 15: "Chebyquad function." 16: "Brown almost-linear function." 17: "Osborne function 1." 18: "Osborne function 2." 19: "Hanson function 1." 20: "Hanson function 2." 21: "McKeown problem 1." 22: "McKeown problem 2." 23: "McKeown problem 3." 24: "Devilliers-Glasser function 1." 25: "Devilliers-Glasser function 2." 26: "The Madsen function." p00_title_test(): Normal end of execution. p00_mn_test(): p00_mn() returns information about the value or range of m: the number of equations or functions; n: the number of variables. Test Title m, n information 1 "Linear function, full rank." m arbitrary and n arbitrary and m => n. 2 "Linear function, rank 1." m arbitrary and n arbitrary and m => n. 3 "Linear function, rank 1, zero columns and rows." m arbitrary and n arbitrary and m => n. 4 "Rosenbrock function." m = 2, n = 2 5 "Helical valley function." m = 3, n = 3 6 "Powell singular function." m = 4, n = 4 7 "Freudenstein-Roth function." m = 2, n = 2 8 "Bard function." m = 15, n = 3 9 "Kowalik and Osborne function." m = 11, n = 4 10 "Meyer function." m = 16, n = 3 11 "Watson function." m = 31, 2 <= n <= 31 12 "Box 3-dimensional function." m arbitrary and m => n and n = 3. 13 "Jennrich-Sampson function." m arbitrary and m => n and n = 2. 14 "Brown and Dennis function." m arbitrary and m => n and n = 4. 15 "Chebyquad function." m arbitrary and n arbitrary and m => n. 16 "Brown almost-linear function." m arbitrary and n arbitrary and m == n. 17 "Osborne function 1." m = 33, n = 5 18 "Osborne function 2." m = 65, n = 11 19 "Hanson function 1." m = 16, n = 2 20 "Hanson function 2." m = 16, n = 3 21 "McKeown problem 1." m = 3, n = 2 22 "McKeown problem 2." m = 4, n = 3 23 "McKeown problem 3." m = 10, n = 5 24 "Devilliers-Glasser function 1." m = 24, n = 4 25 "Devilliers-Glasser function 2." m = 16, n = 5 26 "The Madsen function." m = 3, n = 2 p00_f_test(): p00_f() evaluates m objective functions at the n-point x. Use x=p00_start(), fx=p00_f(x); Print norms of x and fx. 1 "Linear function, full rank." m = 5, n = 3 ||x|| = 1.73205 ||fx|| = 3.74166 2 "Linear function, rank 1." m = 5, n = 3 ||x|| = 1.73205 ||fx|| = 42.4853 3 "Linear function, rank 1, zero columns and rows." m = 5, n = 3 ||x|| = 1.73205 ||fx|| = 6.08276 4 "Rosenbrock function." m = 2, n = 2 ||x|| = 1.56205 ||fx|| = 4.91935 5 "Helical valley function." m = 3, n = 3 ||x|| = 1 ||fx|| = 50 6 "Powell singular function." m = 4, n = 4 ||x|| = 3.31662 ||fx|| = 14.6629 7 "Freudenstein-Roth function." m = 2, n = 2 ||x|| = 2.06155 ||fx|| = 20.0125 8 "Bard function." m = 15, n = 3 ||x|| = 1.73205 ||fx|| = 6.45614 9 "Kowalik and Osborne function." m = 11, n = 4 ||x|| = 0.734115 ||fx|| = 0.0728915 10 "Meyer function." m = 16, n = 3 ||x|| = 4007.8 ||fx|| = 41153.5 11 "Watson function." m = 31, n = 5 ||x|| = 0 ||fx|| = 5.47723 12 "Box 3-dimensional function." m = 5, n = 3 ||x|| = 22.3607 ||fx|| = 26.4232 13 "Jennrich-Sampson function." m = 4, n = 2 ||x|| = 0.5 ||fx|| = 3.61455 14 "Brown and Dennis function." m = 6, n = 4 ||x|| = 26 ||fx|| = 1808.17 15 "Chebyquad function." m = 5, n = 3 ||x|| = 0.935414 ||fx|| = 0.339935 16 "Brown almost-linear function." m = 5, n = 5 ||x|| = 1.11803 ||fx|| = 6.0777 17 "Osborne function 1." m = 33, n = 5 ||x|| = 1.87096 ||fx|| = 0.937564 18 "Osborne function 2." m = 65, n = 11 ||x|| = 11.8695 ||fx|| = 1.44687 19 "Hanson function 1." m = 16, n = 2 ||x|| = 10.0011 ||fx|| = 18.6281 20 "Hanson function 2." m = 16, n = 3 ||x|| = 25.0004 ||fx|| = 10.4093 21 "McKeown problem 1." m = 3, n = 2 ||x|| = 0.141421 ||fx|| = 0.59498 22 "McKeown problem 2." m = 4, n = 3 ||x|| = 0.173205 ||fx|| = 0.969451 23 "McKeown problem 3." m = 10, n = 5 ||x|| = 0.223607 ||fx|| = 1.15475 24 "Devilliers-Glasser function 1." m = 24, n = 4 ||x|| = 10.0233 ||fx|| = 352.527 25 "Devilliers-Glasser function 2." m = 16, n = 5 ||x|| = 45.1476 ||fx|| = 182.162 26 "The Madsen function." m = 3, n = 2 ||x|| = 3.16228 ||fx|| = 13.012 p00_sol_test(): p00_sol() returns an n vector x which is an approximate minimizer of the objective function p00_f(x). 1 "Linear function, full rank." m = 5, n = 3 ||x|| = 1.73205 ||fx|| = 1.41421 2 "Linear function, rank 1." m = 5, n = 3 ||x|| = 0.0787296 ||fx|| = 0.953463 3 "Linear function, rank 1, zero columns and rows." m = 5, n = 3 ||x|| = 0.371154 ||fx|| = 1.55839 4 "Rosenbrock function." m = 2, n = 2 ||x|| = 1.41421 ||fx|| = 0 5 "Helical valley function." m = 3, n = 3 ||x|| = 1 ||fx|| = 0 6 "Powell singular function." m = 4, n = 4 ||x|| = 0 ||fx|| = 0 7 "Freudenstein-Roth function." m = 2, n = 2 ||x|| = 6.40312 ||fx|| = 0 8 "Bard function." m = 15, n = 3 ||x|| = 2.6045 ||fx|| = 0.090636 9 "Kowalik and Osborne function." m = 11, n = 4 ||x|| = 0.331289 ||fx|| = 0.0175369 10 "Meyer function." m = 16, n = 3 ||x|| = 0.00619093 ||fx|| = 62376 11 "Watson function." m = 31, n = 5 ||x|| = 1.34751 ||fx|| = 0.130975 12 "Box 3-dimensional function." m = 5, n = 3 ||x|| = 10.0995 ||fx|| = 0 13 "Jennrich-Sampson function." m = 4, n = 2 An approximate solution is not given! 14 "Brown and Dennis function." m = 6, n = 4 An approximate solution is not given! 15 "Chebyquad function." m = 5, n = 3 An approximate solution is not given! 16 "Brown almost-linear function." m = 5, n = 5 ||x|| = 2.23607 ||fx|| = 0 17 "Osborne function 1." m = 33, n = 5 ||x|| = 2.45647 ||fx|| = 0.0111605 18 "Osborne function 2." m = 65, n = 11 ||x|| = 9.38185 ||fx|| = 0.200344 19 "Hanson function 1." m = 16, n = 2 ||x|| = 8.84506 ||fx|| = 14.4465 20 "Hanson function 2." m = 16, n = 3 ||x|| = 23.4935 ||fx|| = 6.05085 21 "McKeown problem 1." m = 3, n = 2 ||x|| = 0.00020111 ||fx|| = 0.428487 22 "McKeown problem 2." m = 4, n = 3 ||x|| = 0.000605887 ||fx|| = 0.8925 23 "McKeown problem 3." m = 10, n = 5 ||x|| = 0.000204817 ||fx|| = 1 24 "Devilliers-Glasser function 1." m = 24, n = 4 ||x|| = 0.204817 ||fx|| = 324.567 25 "Devilliers-Glasser function 2." m = 16, n = 5 ||x|| = 53.9536 ||fx|| = 0 26 "The Madsen function." m = 3, n = 2 ||x|| = 0.711752 ||fx|| = 0.879317 lsqnonlin_test(): lsgnonlin() seeks an n-vector x* which minimizes the L2 norm of m functions f(x*). Use x0=p00_start(), fx0=p00_f(x0); Compare norms of x0 and x*, fx0 and fx*. Local minimum found. Optimization completed because the size of the gradient is less than the value of the optimality tolerance. 1 "Linear function, full rank." m = 5, n = 3 ||x0|| = 1.73205, ||x*|| = 1.73205 ||fx0|| = 3.74166, ||fx*|| = 1.41421 -1.000000095367428 -1.000000095367428 -1.00000009536743 Local minimum found. Optimization completed because the size of the gradient is less than the value of the optimality tolerance. 2 "Linear function, rank 1." m = 5, n = 3 ||x0|| = 1.73205, ||x*|| = 0.658699 ||fx0|| = 42.4853, ||fx*|| = 0.953463 0.5909090909090908 0.1818181818181818 -0.2272727272727275 Local minimum found. Optimization completed because the size of the gradient is less than the value of the optimality tolerance. 3 "Linear function, rank 1, zero columns and rows." m = 5, n = 3 ||x0|| = 1.73205, ||x*|| = 1.43036 ||fx0|| = 6.08276, ||fx*|| = 1.55839 1 0.2142857142857143 1 Local minimum found. Optimization completed because the size of the gradient is less than the value of the optimality tolerance. 4 "Rosenbrock function." m = 2, n = 2 ||x0|| = 1.56205, ||x*|| = 1.41421 ||fx0|| = 4.91935, ||fx*|| = 2.22045e-16 0.9999999999999998 0.9999999999999996 Local minimum found. Optimization completed because the size of the gradient is less than the value of the optimality tolerance. 5 "Helical valley function." m = 3, n = 3 ||x0|| = 1, ||x*|| = 1 ||fx0|| = 50, ||fx*|| = 1.54489e-09 1.000000000080927 -8.268496300920794e-11 -1.476098393032393e-19 Local minimum possible. lsqnonlin stopped because the final change in the sum of squares relative to its initial value is less than the value of the function tolerance. 6 "Powell singular function." m = 4, n = 4 ||x0|| = 3.31662, ||x*|| = 0.00958099 ||fx0|| = 14.6629, ||fx*|| = 0.000193613 0.009300611328338135 -0.0009300611328338136 0.00148810094977127 0.001488100949771269 Local minimum possible. lsqnonlin stopped because the final change in the sum of squares relative to its initial value is less than the value of the function tolerance. 7 "Freudenstein-Roth function." m = 2, n = 2 ||x0|| = 2.06155, ||x*|| = 11.4514 ||fx0|| = 20.0125, ||fx*|| = 6.99888 11.41628189848148 -0.8966161350591582 Local minimum found. Optimization completed because the size of the gradient is less than the value of the optimality tolerance. 8 "Bard function." m = 15, n = 3 ||x0|| = 1.73205, ||x*|| = 2.60451 ||fx0|| = 6.45614, ||fx*|| = 0.090636 0.08241057546968525 1.133036616466467 2.34369467452195 Local minimum possible. lsqnonlin stopped because the final change in the sum of squares relative to its initial value is less than the value of the function tolerance. 9 "Kowalik and Osborne function." m = 11, n = 4 ||x0|| = 0.734115, ||x*|| = 0.331305 ||fx0|| = 0.0728915, ||fx*|| = 0.0175369 0.1926099832249079 0.1956064076336346 0.1238366129897953 0.1380836377379259 Local minimum possible. lsqnonlin stopped because the final change in the sum of squares relative to its initial value is less than the value of the function tolerance. 10 "Meyer function." m = 16, n = 3 ||x0|| = 4007.8, ||x*|| = 6190.98 ||fx0|| = 41153.5, ||fx*|| = 9.37795 0.005609632949788252 6181.346874415027 345.2236525560033 Local minimum possible. lsqnonlin stopped because the final change in the sum of squares relative to its initial value is less than the value of the function tolerance. 11 "Watson function." m = 31, n = 5 ||x0|| = 0, ||x*|| = 1.3475 ||fx0|| = 5.47723, ||fx*|| = 0.130975 -0.07121579623610998 0.9699635941711958 0.2667389261065757 -0.5408310139170772 0.7114865026427761 Local minimum possible. lsqnonlin stopped because the final change in the sum of squares relative to its initial value is less than the value of the function tolerance. 12 "Box 3-dimensional function." m = 5, n = 3 ||x0|| = 22.3607, ||x*|| = 10.0995 ||fx0|| = 26.4232, ||fx*|| = 1.95348e-06 0.9999890518208174 10.00001794521598 1.000003083378063 Local minimum possible. lsqnonlin stopped because the size of the current step is less than the value of the step size tolerance. 13 "Jennrich-Sampson function." m = 4, n = 2 ||x0|| = 0.5, ||x*|| = 0.596441 ||fx0|| = 3.61455, ||fx*|| = 2.05218 0.4217471832276551 0.4217470823915382 Local minimum possible. lsqnonlin stopped because the final change in the sum of squares relative to its initial value is less than the value of the function tolerance. 14 "Brown and Dennis function." m = 6, n = 4 ||x0|| = 26, ||x*|| = 2.64221 ||fx0|| = 1808.17, ||fx*|| = 0.0424341 0.674354769056086 2.102169543885013 1.204537747127789 -0.8102522391580985 Local minimum possible. lsqnonlin stopped because the final change in the sum of squares relative to its initial value is less than the value of the function tolerance. 15 "Chebyquad function." m = 5, n = 3 ||x0|| = 0.935414, ||x*|| = 0.965091 ||fx0|| = 0.339935, ||fx*|| = 0.247207 0.1988347125948 0.500000004550753 0.8011652941401564 Local minimum found. Optimization completed because the size of the gradient is less than the value of the optimality tolerance. 16 "Brown almost-linear function." m = 5, n = 5 ||x0|| = 1.11803, ||x*|| = 8.97029 ||fx0|| = 6.0777, ||fx*|| = 5.92594e-10 -0.5790430885734463 -0.5790430885734461 -0.5790430885734466 -0.5790430885734461 8.895215442867157 Local minimum found. Optimization completed because the size of the gradient is less than the value of the optimality tolerance. 17 "Osborne function 1." m = 33, n = 5 ||x0|| = 1.87096, ||x*|| = 2.4565 ||fx0|| = 0.937564, ||fx*|| = 0.00739249 0.3754100416062166 1.935845757156065 -1.464685972483959 0.01286753226437881 0.02212270426759918 Local minimum possible. lsqnonlin stopped because the final change in the sum of squares relative to its initial value is less than the value of the function tolerance. 18 "Osborne function 2." m = 65, n = 11 ||x0|| = 11.8695, ||x*|| = 9.38186 ||fx0|| = 1.44687, ||fx*|| = 0.200344 1.309983246673116 0.4315686922048612 0.6336672668075475 0.5994463525737612 0.75422356688036 0.9041607166676418 1.365905499421799 4.823518573812584 2.398681387721783 4.568872585179741 5.675338144975145 Local minimum possible. lsqnonlin stopped because the final change in the sum of squares relative to its initial value is less than the value of the function tolerance. 19 "Hanson function 1." m = 16, n = 2 ||x0|| = 10.0011, ||x*|| = 8.84505 ||fx0|| = 18.6281, ||fx*|| = 14.4465 8.844194798782166 0.1232098456220024 Local minimum possible. lsqnonlin stopped because the final change in the sum of squares relative to its initial value is less than the value of the function tolerance. 20 "Hanson function 2." m = 16, n = 3 ||x0|| = 25.0004, ||x*|| = 23.4936 ||fx0|| = 10.4093, ||fx*|| = 6.05084 23.49332508609507 -0.05820044646440356 0.08749545618424547 Local minimum possible. lsqnonlin stopped because the final change in the sum of squares relative to its initial value is less than the value of the function tolerance. 21 "McKeown problem 1." m = 3, n = 2 ||x0|| = 0.141421, ||x*|| = 0.000201087 ||fx0|| = 0.59498, ||fx*|| = 0.428487 -0.0001845562653453074 7.984335017008976e-05 Local minimum possible. lsqnonlin stopped because the final change in the sum of squares relative to its initial value is less than the value of the function tolerance. 22 "McKeown problem 2." m = 4, n = 3 ||x0|| = 0.173205, ||x*|| = 0.000605865 ||fx0|| = 0.969451, ||fx*|| = 0.8925 -0.0001417903400337357 -4.418674263965728e-05 -0.0005873804898714082 Local minimum possible. lsqnonlin stopped because the final change in the sum of squares relative to its initial value is less than the value of the function tolerance. 23 "McKeown problem 3." m = 10, n = 5 ||x0|| = 0.223607, ||x*|| = 0.000204776 ||fx0|| = 1.15475, ||fx*|| = 1 -0.0001212635405446916 4.91675611694011e-05 0.000134288796488839 -4.224477334498134e-05 -7.065988192469374e-05 Local minimum found. Optimization completed because the size of the gradient is less than the value of the optimality tolerance. 24 "Devilliers-Glasser function 1." m = 24, n = 4 ||x0|| = 10.0233, ||x*|| = 60.7679 ||fx0|| = 352.527, ||fx*|| = 2.96596e-10 60.13700000000261 1.370999999999336 3.112000000000305 8.04418530717949 Local minimum found. Optimization completed because the size of the gradient is less than the value of the optimality tolerance. 25 "Devilliers-Glasser function 2." m = 16, n = 5 ||x0|| = 45.1476, ||x*|| = 53.9536 ||fx0|| = 182.162, ||fx*|| = 4.7853e-09 53.80999999880319 1.269999999993812 3.011999998346517 2.130000001739706 0.5069999999997495 Local minimum possible. lsqnonlin stopped because the final change in the sum of squares relative to its initial value is less than the value of the function tolerance. 26 "The Madsen function." m = 3, n = 2 ||x0|| = 3.16228, ||x*|| = 0.711646 ||fx0|| = 13.012, ||fx*|| = 0.879318 0.1548063949265251 -0.6946045737617149 test_nls_test(): Normal end of execution. 04-Mar-2026 08:53:06