用以下代码得出的拟合函数类型是cfit类型,而不是diff要求的f句柄,如何进行转化并求极值点?
ftype=fittype('fourier4');
fopt=fitoptions('Method','NonlinearLeastSquares');
[fresult,gof]=fit(X,Y1,ftype,fopt);%%fresult为拟合函数

 채택된 답변

0 개 추천

这里你得到解析式之后,可以直接用符号函数进行求导了
syms x
y=fresult(x)
diff(y,x)

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!