Gradient Descent (Solving Quadratic Equations with Two Variables)

The algorithm shows the Steepest Descent Method or Gradient Descent Method
1,2K download
Aggiornato 12 mar 2017

Visualizza la licenza

The code highlights the Gradient Descent method. The algorithm works with any quadratic function (Degree 2) with two variables (X and Y). Refer comments for all the important steps in the code to understand the method. In order to implement the algorithm for higher order polynomial equations (more than degree 2); the optimal step length needs to be calculated using fmincon or fminbnd after every step which involves using function handles making the algorithm complex. However, one can easily assume the step size and arrive at the minimum or optimum answer at the cost of more computations. So, to implement the code for higher order polynomials, instead of computing step length at each iteration, one can assume h (step length) as a constant. Let me know if you are interested in the code for higher order polynomials with 2 variables.
- Thank you

Cita come

Soumitra Sitole (2026). Gradient Descent (Solving Quadratic Equations with Two Variables) (https://it.mathworks.com/matlabcentral/fileexchange/62010-gradient-descent-solving-quadratic-equations-with-two-variables), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2016b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Polynomials in Help Center e MATLAB Answers
Versione Pubblicato Note della release
1.0.0.0