AI Blocks › Build and ship software
Curve fitting helper
Give it x and y data. Get the best curve or surface fit, with outliers handled and code to repeat it.
Curve fitting helper is a free AI skill for the job "Build and ship software". Give the instructions to an AI assistant that supports the required files and tools, then review its output.
Free · No account · BSD 2 Clause licence · Made by MathWorks
Made by MathWorks. See the original on GitHub; we copied it as it is, with its licence.
What it does
Finding the right curve for your data is slow when you try every model by hand. Give it x and y values and it guides you through fitting a curve or surface in MATLAB's Curve Fitter app, then hands back code to repeat the work. You start by choosing data, then try fit types like regression, interpolation, smoothing and splines. It helps you read the plots and the numbers, exclude outliers by sight, and compare several fits in one session. When you are happy, you can export a figure, generate MATLAB code, save fits to the workspace or send a fit to a Simulink lookup table. It needs MATLAB and the Curve Fitting Toolbox.
You give it
- Your x and y data, or x, y and z for a surface
- MATLAB with the Curve Fitting Toolbox
- A model idea or equation (optional)
- A saved session file (optional)
You get
- A fit with its numbers and plots
- Outliers excluded with a reason
- A comparison of fit types
- Generated MATLAB code and exports
Use it when
- You have measured data and do not know which model fits it.
- A few bad readings are pulling your fit off and need removing.
- You want to compare a polynomial, a spline and a custom equation side by side.
- You need a fitted curve as a Simulink lookup table.
How to use it
- Add it to your AI once: download it and add the folder to Claude, ChatGPT or Codex as a skill.
- Ask for the job in your own words. Your AI opens the skill when it fits.
- It works best when your AI can run MATLAB with the Curve Fitting Toolbox.