使用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

 Accepted Answer

0 votes

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

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!