Hello I want to solve this equation with Matlab but I have some problem.Please help to me for solving this equation.Finally I should find β,aR,KR,R2 values.
f(qe,ye)
β,aR,KR are constant
%qe=[1.48 4.11 3.72 7.11 9.71 10.76 ];
%Ce=[2.57 9.40 31.38 34.41 51.45 146.20 ];
xdata=[2.57 9.40 31.38 34.41 51.45 146.20];
ydata=[1.48 4.11 3.72 7.11 9.71 10.76 ];
x0 =[1;10;100];
[x, resnorm]= lsqcurvefit(@hadifun,x0,xdata,ydata)
"Error
>> nonlinear
Error using lsqcurvefit (line 248)
Function value and YDATA sizes are not equal.
Error in nonlinear (line 6)
[x, resnorm]= lsqcurvefit(@hadifun,x0,xdata,ydata)"
function F = hadifun(x,xdata)
F = (x(1)*xdata)/(1+((x(2)*xdata.^(x(3)))));
end
"Error
>> hadifun
Error using hadifun (line 2)
Not enough input arguments. "

 채택된 답변

Matt J
Matt J 2015년 3월 29일

0 개 추천

Looks like you need dot-division,
F = (x(1)*xdata)./(1+((x(2)*xdata.^(x(3)))));

추가 답변 (1개)

matstudent
matstudent 2015년 3월 29일

0 개 추천

Thanks all of you. I've recently started.

카테고리

도움말 센터File Exchange에서 Systems of Nonlinear Equations에 대해 자세히 알아보기

질문:

2015년 3월 29일

답변:

2015년 3월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by