fittype input argument error

1 view (last 30 days)
Elizabeth
Elizabeth on 15 Dec 2012
Hi I am trying to run a code to fit a curve to some data. The code works on a colleagues version of Matlab. When I try to define the fittype using:
g = fittype( @(a, b, c, x) c*(x-a).*exp(-0.5*((x-a)/b).^2), ... 'independent', {'x'});
I get the following error:
Error using fittype (line 212) First input argument must be a string or cell array.
Any help greatly appreciated.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!