The Linear and Quadratic Approximations and Newton Raphson

A program about Linear and Quadratic Approximations and Newton Raphson
23 Downloads
Updated 18 Oct 2022

View License

%In my Optimization and Applications class in 2022, the computer science master students at Xiangtan University expressed their difficulties in making sense of the content of linear and quadratic approximations. Therefore, I compose this code to provide them with the necessary help. The code segment consists of three parts, surrogate1, surrogate2, and Newton-Raphson, to compare the searching trajectories corresponding to each optimization model on the 2-dimensional Rosenbrock benchmark.
In the first part, the first-order derivative is approximated by using central difference formula, PFx_f(x,y) = (f((x,y)+delta(x,y))- f((x,y)+delta(x,y)))/(delta(x))
In the second part, the quadratic model is assumed as, f(x,y) = a+b*x+c*y+d*x^2+e*y^2+ f*x*y+O(error), let X = [a,b,c,d,e,f]
In the third part, a standard Newton-Raphson algorithm is processed.
Email:chixinxiao@gmail.com;
The first edition was written on 17 Jan 2019, UoW,AU
The recent edition is revised on 16 Oct 2022, Changsha, China
f(x,y) = 100*(y-x^2)^2+(1-x)^2;

Cite As

Chixin Xiao (2025). The Linear and Quadratic Approximations and Newton Raphson (https://www.mathworks.com/matlabcentral/fileexchange/119143-the-linear-and-quadratic-approximations-and-newton-raphson), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2022b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.2

The surrogate II has been upgraded from 5 items to 6 items, i.e., f(x,y) = a+b*x+c*y+d*x^2+e*y^2+ f*x*y+O(error), let X = [a,b,c,d,e,f]

1.0.1

Revise the bugs in the second part

1.0.0