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

75 Ansichten (letzte 30 Tage)
mandoo511 am 6 Apr. 2015 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.
##### 0 Kommentare-1 ältere Kommentare anzeigen-1 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

### Antworten (2)

Vinod Sudheesh am 26 Jun. 2015
Bearbeitet: Vinod Sudheesh am 26 Jun. 2015
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 KommentarKeine anzeigenKeine ausblenden
Sarvjeet Singh am 28 Sep. 2020
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: Melden Sie sich an, um zu kommentieren.

why solve in matlab by steepest descent?  ##### 0 Kommentare-1 ältere Kommentare anzeigen-1 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

### Kategorien

Mehr zu Least Squares finden Sie in Help Center und File Exchange

### Community Treasure Hunt

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

Start Hunting!