matlab中怎么把积分函数 int 得到的不定积分式代入 solve 函数中进行计算?例如:syms r xfun=int(r*exp(-2*(r/2)^2),r,0,x);x=solve('fun-0.5','x');运行将会报错:Warning:Explicit solution could not be found.> In solve at 81
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/23 06:23:15
matlab中怎么把积分函数 int 得到的不定积分式代入 solve 函数中进行计算?例如:syms r xfun=int(r*exp(-2*(r/2)^2),r,0,x);x=solve('fun-0.5','x');运行将会报错:Warning:Explicit solution could not be found.> In solve at 81
matlab中怎么把积分函数 int 得到的不定积分式代入 solve 函数中进行计算?
例如:
syms r x
fun=int(r*exp(-2*(r/2)^2),r,0,x);
x=solve('fun-0.5','x');
运行将会报错:
Warning:Explicit solution could not be found.
> In solve at 81
但是如果是运行
x=solve('int(r*exp(-2*(r/2)^2)-0.5,r,0,x)','x');
又会报错
Error using ==> solve>getEqns at 182
' int(r*exp(-2*(r/2)^2)-0.5,r,0,x) ' is not a valid expression or equation.
Error in ==> solve at 67
[eqns,vars] = getEqns(varargin{:});
matlab中怎么把积分函数 int 得到的不定积分式代入 solve 函数中进行计算?例如:syms r xfun=int(r*exp(-2*(r/2)^2),r,0,x);x=solve('fun-0.5','x');运行将会报错:Warning:Explicit solution could not be found.> In solve at 81
syms r x
fun=int(r*exp(-2*(r/2)^2),r,0,x);
x=solve(fun-0.5)
x =
2^(1/2)*log(2)^(1/2)
-2^(1/2)*log(2)^(1/2)