求助一个简单的一元超越方程的求解问题。

我已经用ezplot函数画出了该超越方程的图形,见下图所示,由图可看出,该超越方程存在两个根,在-1,1之间。但是不知道Y=0时具体对应的X的数值,采用了fzero函数总出现错误,求高手帮我看看问题出在哪里了???
我的目的是想得到下面图中当Y=0时,对应的具体的横坐标的数值!如果有其他方法也行,比如从网上直接测量的办法等。
clc
clear all
syms s;
kl=105.35;
ks=218;
tm=933;
ti=1273;
tw=303;
L=397500;
cs=917;
al=4.1e-5;
as=1.0e-4
M=4/(3*sqrt(pi))*(-s+sqrt(s^2+(3*al)/(2*as)));
fun=inline('exp(-s^2)/erf(s)+(kl/ks)*((tm-ti)/(tm-tw))*(1/M)-(s*L*sqrt(pi))/(cs*(tm-tw))','s')
fzero(fun,[-1,1])

 采纳的回答

xagew
xagew 2022-11-22

0 个投票

昨天没注意到代码里有错误,改正一下发现fzero还是能工作的,完整代码如下:
kl=105.35;
ks=218;
tm=933;
ti=1273;
tw=303;
L=397500;
cs=917;
al=4.1e-5;
as=1.0e-4;
M = @(s) 4/(3*sqrt(pi))*(-s+sqrt(s^2+(3*al)/(2*as)));
fun = @(s)(exp(-s^2)/erf(s)+(kl/ks)*((tm-ti)/(tm-tw))*(1/M(s))-(s*L*sqrt(pi))/(cs*(tm-tw)));
fzero(fun, -1)
fzero(fun, 1)
ezplot(fun, [-2 2]) % 画图
而且图像表明在0点附近是连续的。
[attach]138516[/attach]

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 编程 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!