作业帮 > 综合 > 作业

matlab 中解二元非线性方程组问题,fsolve高手帮帮忙

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/15 07:00:01
matlab 中解二元非线性方程组问题,fsolve高手帮帮忙
function F=myfun(x);
Isc=11;
Voc=26.9;
Vmpp=21.6;
Impp=10.2;
ns=1;
Vt=13.8;
Rs=x(1);
Rsh=x(2);
F=[(Isc*Rsh+Isc*Rs-Voc)*exp((Vmpp+Impp*Rs-Voc)/(ns*Vt))-(Isc-Impp)*(Rs+Rsh)-Vmpp;(Voc-Isc*(Rs+Rsh))/(ns*Vt)*exp(((Vmpp+Impp*Rs-Voc)/(ns*Vt)))-(Impp*(1+Rs+Rsh)-Vmpp)/(Impp*Rs-Vmpp)];
y=fsolve('myfun',[1,1])
fsolve stopped because the problem appears regular as measured by the gradient,
but the vector of function values is not near zero as measured by the
default value of the function tolerance.
没结果咋回事啊?
F表达式多了中括号,去掉后得到正解.
Equation solved.
fsolve completed because the vector of function values is near zeroas measured by the default value of the function tolerance,and
the problem appears regular as measured by the gradient.
x = 1.5189 1.9865
fval =
8.8622e-010
exitflag =
1
再问: 答案还是不正确,你试试两个方程的左右两边结果不相等