Simplified Gradient Descent Optimization

Demonstration of the gradient descent optimization algorithm with a fixed step size.


Updated 7 Oct 2018

View License

This example was developed for use in teaching optimization in graduate engineering courses. This example demonstrates how the gradient descent method can be used to solve a simple unconstrained optimization problem. Taking large step sizes can lead to algorithm instability, but small step sizes result in low computational efficiency. A corresponding video can be found here:

Cite As

James Allison (2023). Simplified Gradient Descent Optimization (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes

Only changed video link in subscription. Code is unchanged.