Hi,
I want to fit an exponential function to my data, and force this exponential to be positive and decreasing (i.e. y=a*exp(b*x) with a>0 and b<0).
I figured this is what I need (built using examples from helfile):
fo = fitoptions('Method','LinearLeastSquares',... 'Lower',[0,-Inf],... 'Upper',[Inf,0]); ft = fittype('a*exp(b*x)','independent','x','coefficients',{'a','b'},'options','fo');coeffs=fit(data(:,1),data(:,2), 'ft');
However, I get a weird error message while compiling:
To use 'copy', at least one of the following products must be licensed, installed, and enabled: RF Toolbox Simulink Simulink Control Design Simulink Design Optimization StateflowError in fittype>iParseParameters (line 567) obj.fFitoptions = copy( value ); .....
Do I really need additional toolboxes, or is there a wrong syntax in my code that I can't see?
Thanks a lot in advance,
Francois
Best Answer