The Linear and Quadratic Approximations and Newton Raphson
Version 1.0.2 (3.1 KB) by
Chixin Xiao
A program about Linear and Quadratic Approximations and Newton Raphson
%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 LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.