ChatGPT Generated MATLAB program

Example simple MATLAB program generated by ChatGPT.
Updated 21 Feb 2023

View License

My first try generated this fairly simple program that performs a polynomial fit to supplied data, and plots the result although I didn't ask for that! Have fun out there!
I used Copy for ChatGPT Chrome extension to paste the output into a new .mlx, dragged over the code bits to convert from text to code, removed some blank lines, and then added a title, description, and license command.

Cite As

Duncan Carlsmith (2024). ChatGPT Generated MATLAB program (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2022b
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

Spelling. Added required MathWorks Products.