%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;
引用格式
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. 检索时间: .
MATLAB 版本兼容性
创建方式
R2022b
兼容任何版本
平台兼容性
Windows macOS Linux标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!