How to fit an integral with more than one variables?
Ältere Kommentare anzeigen
Hello,
I'm trying to fit data with an integral with 4 variables and I'm not sure how to write the fit.
I have two matrix I(y-axis) and tau(x-axis), and here is the part of my script which fails:
syms d mu sig x
s = fitoptions('Method','NonlinearLeastSquares','Lower',[0.05 0.05],'Upper',[100 100],'Startpoint',[0.05 0.05]);
fff=@(mu,sig,x)vpaintegral((1./(d.*sig.*sqrt(6.28))).*exp((-(log(d)-mu).^2)./(2.*sig.^2)).*0.5.*(1-exp(-(d.*x).^1.1)).*cos(1.9.*d.*x),d,0.05,10)
fitint= fittype(fff, 'options',s)
f3=fittype(tau,Indq,fitint) %ligne 45
I get the following errors:
Error using fittype>iCreateFittype
First input argument must be a string scalar or character vector, cell array or anonymous function.
Error in fittype (line 330)
obj = iCreateFittype( obj, varargin{:} );
Error in Analyse_DQ (line 45)
f3=fittype(tau,I,fitint)
Any suggestions?
Thanks
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Get Started with Curve Fitting Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!