How to use the steepest descent method to solve a function.

조회 수: 43 (최근 30일)
mandoo511
mandoo511 2015년 4월 6일
I have an example but I still am not sure how to solve this problem. Please show me step by step on how to attack this. Thank you.

답변 (2개)

Vinod Sudheesh
Vinod Sudheesh 2015년 6월 26일
편집: Vinod Sudheesh 2015년 6월 26일
Hello,
The below code snippet solves this problem using the "Gradient Descend Algorithm"
clc;
clear;
f=@(x)(25*x(1)*x(1)+20*x(2)*x(2)-2*x(1)-x(2));
x=[3 1]';
gf=@(x)([(50*x(1)-2) ; (40*x(1)-1)]);
n=1;
while(norm( gf(x))>0.05)
x= x-0.01*(1/n) *gf(x);
n=n+1;
end
Note that to solve this problem using the "Steepest Descend Algorithm", you will have to write additional logic for choosing the step size in every iteration.
  댓글 수: 1
Sarvjeet Singh
Sarvjeet Singh 2020년 9월 28일
f=@ (x,y) a*(exp(bx))+c*x
how to solve
determine the general parameters for the non-linear fit using steepest descent method if the fit is given by for the data:

댓글을 달려면 로그인하십시오.


seyed mohammad javad nikouei
seyed mohammad javad nikouei 2021년 6월 14일
why solve in matlab by steepest descent?

카테고리

Help CenterFile Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by