matlab解方程的错误>> solve('(16-p)*poisscdf(p,100)+p-16=0','p')Error using ==> mupadengine.mupadengine>mupadengine.feval at 162Error:cannot differentiate equation [numeric::fsolve]Error in ==> solve>mupadSolve at 232list = feval(symengine,'mlfs
来源:学生作业帮助网 编辑:六六作业网 时间:2025/01/11 12:05:41
matlab解方程的错误>> solve('(16-p)*poisscdf(p,100)+p-16=0','p')Error using ==> mupadengine.mupadengine>mupadengine.feval at 162Error:cannot differentiate equation [numeric::fsolve]Error in ==> solve>mupadSolve at 232list = feval(symengine,'mlfs
matlab解方程的错误
>> solve('(16-p)*poisscdf(p,100)+p-16=0','p')
Error using ==> mupadengine.mupadengine>mupadengine.feval at 162
Error:cannot differentiate equation [numeric::fsolve]
Error in ==> solve>mupadSolve at 232
list = feval(symengine,'mlfsolve',eqns,vars);
Error in ==> solve at 93
[R,symvars,order] = mupadSolve(eqns,vars);
matlab解方程的错误>> solve('(16-p)*poisscdf(p,100)+p-16=0','p')Error using ==> mupadengine.mupadengine>mupadengine.feval at 162Error:cannot differentiate equation [numeric::fsolve]Error in ==> solve>mupadSolve at 232list = feval(symengine,'mlfs
出错的原因是,poisscdf 是以数值方法计算泊松累积分布函数的,不能用符号方法求解.
要解这个方程,可以用fsolve,例如:
>> fsolve(@(p)(16-p)*poisscdf(p,100)+p-16,0)
Optimization terminated: first-order optimality is less than options.TolFun.
ans =
16