使用lsqcurvefit进行曲线拟合时,一直报错尺寸不一致,但是我的xdata为951*1;ydata也为951*1,function value和ydata应该是一致的啊,还请各位前辈指教!M文件如下:
function y=giesekus(c,xdata)
%UNTITLED 此处显示有关此函数的摘要
% 此处显示详细说明size
y=(3.996/(((1+0.015984*c(1)^2.*xdata.^2).^0.5+1).^0.5.*(((1+0.015984*c(1)^2.*xdata.^2).^0.5+1).^0.5+0.998*2^0.5)))*c(2);
end

 채택된 답변

0 개 추천

分母是向量了,需要用点除
3.996/
改成
3.996./

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 非线性最小二乘(曲线拟合)에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!