1

I'm new to MATLAB and I am trying to use the exp2fit function, but the command window throws the following error:

Undefined function or variable 'exp2fit'.

Error in myscript (line 34)

s=exp2fit(t,f,1);

What am I doing wrong?

jub0bs
  • 46,795
  • 22
  • 148
  • 157

1 Answers1

1

The function is not built-in to MATLAB. You need to download it from the MATLAB File Exchange. Then you need to either put it somewhere in your MATLAB PATH or in the same folder as the function you are executing.

IKavanagh
  • 5,704
  • 11
  • 38
  • 44