fit function - Incorrect number or types of inputs or outputs for function fit.

I'm trying to fit data into a function, and it was failing. So to understand it, it've tried the matlab example, and it give me the same error:
Incorrect number or types of inputs or outputs for function fit.
So i'm a bit lost because even the example is failing...

2 Comments

Please show us the output of this command:
which fit -all
/MATLAB/toolbox/curvefit/curvefit/fit.m /MATLAB/toolbox/mbc/mbcdesign/@contwostage/fit.m % contwostage method /MATLAB/toolbox/mbc/mbcdesign/@conbase/fit.m % conbase method /MATLAB/toolbox/mbc/mbcdesign/@conswitch/fit.m % conswitch method /MATLAB/toolbox/mbc/mbcmodels/@localmod/fit.m % localmod method /MATLAB/toolbox/mbc/mbcmodels/@localmulti/fit.m % localmulti method /MATLAB/toolbox/mbc/mbcmodels/@xregmodel/fit.m % xregmodel method /MATLAB/toolbox/stats/stats/@gmdistribution/fit.m % gmdistribution method
Also: tell us what MATLAB version you are using, and whether you have a license for the Curve Fitting Toolbox.
Hi Stephen, thanks for answering first.So here's what i got from the cmd. For the Curve Fitting Toolbox, i've asked for a trial last week, so i expect it to be fine. I'm on 2024b.

Sign in to comment.

 Accepted Answer

@Kevin: you do not have FIT from the Curve Fitting Toolbox listed. Check your licenses online:

1 Comment

Hi Stephen, thanks for noticing. I must had made a mistake as i thought i downloaded it. Thanks, and sorry for the disturbance.

Sign in to comment.

More Answers (0)

Categories

Products

Release

R2024b

Asked:

on 2 Mar 2026

Moved:

on 2 Mar 2026

Community Treasure Hunt

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

Start Hunting!