How to create a 'fittype' calling PDE toolbox function
조회 수: 2 (최근 30일)
이전 댓글 표시
I'd like to call a function that solves PDE to fit a surface named 'surface2'. Here -in three lignes- what I have guessed so far (all variables are previously defined):
ft=fittype(@(Tau,D,Rrad,x,t) fct_fit(Tau,D,Rrad,ni,FWHM,x,t),'independent',{'x','t'},'coefficients',{'Tau','D','Rrad'})
[tmp1 ,tmp2, tmp3]=prepareSurfaceData(x,t,surface2);
[surffit,strt] = fit([tmp1 ,tmp2],tmp3,ft)
Important point : if i run ony: fct_fit(ni,FWHM,Tau,D,Rrad,x,t) it is working well and it gives me the simulated matrix with the input paramters
BUT, if I run the full line 'ft' for the fittype it tells me 'Expression fct_fit(Tau,D,Rrad,ni,FWHM,x,t) is not a valid MATLAB expression, has non-scalar coefficients, or cannot be evaluated:
Error while trying to evaluate FITTYPE function :
The entries of TSPAN must be strictly increasing.
Also things i have tried (still same things): adding a z dependent variable ; chnaging the order fct_fit(ni,FWHM,Tau,D,Rrad,x,t) by fct_fit(Tau,D,Rrad,ni,FWHM,x,t)
Thanks in advance for your help
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!