Matlab 解方程,无法求解析解,怎样修改?

2024-12-30 22:50:43
推荐回答(1个)
回答1:

function eq=mpd(y) % 在当前工作文件夹下保存为 mpd.m 文件
syms x
power1=2.5*((x/(100))+1/4/(1-x/(100))^2-1/4);
power2=-1*((x/(100))+1/4/(1-x/(100))^2-1/4);
kf= 0.3*exp(power1);
kb=0.003*exp(power2);
z=double(int((kf*5-kb*300),x,0,y));
eq=z-100;

%%%%%%%%%%%%%%%%%%%%%%%%%

运行以下:
[y,fval]=fzero('mpd',20) % fval=mpd(y)