??? Error: Unexpected MATLAB operator.

2 ビュー (過去 30 日間)
XIONG Qingxiang
XIONG Qingxiang 2019 年 7 月 10 日
コメント済み: XIONG Qingxiang 2019 年 7 月 10 日
Hello everyone,
I'm cofused by this problem for several days. here is the error message:
??? Error: Unexpected MATLAB operator.
Error in ==> sym.eval at 15
s = evalin('caller',vectorize(map2mat(char(x))));
Error in ==> test_nmt_m2 at 80
J1 = eval(feval(symengine,'numeric::int',f4,'r=lower3..upper3')) + ...
Here is the code which producing the error:
J1 = eval(feval(symengine,'numeric::int',f4,'r=lower3..upper3')) + ...
eval(feval(symengine,'numeric::int',f2,'r=lower1..upper1')) + ...
eval(feval(symengine,'numeric::int',f3,'r=lower5..upper5')) + ...
eval(feval(symengine,'numeric::int',f4,'r=lower2..upper2'));
Thanks in advance if anybody can solve this problem.

採用された回答

Walter Roberson
Walter Roberson 2019 年 7 月 10 日
Never eval() a symbolic expression. The language they use is not MATLAB and is not mupad.
I suspect that numeric integration is failing for you, returning back an unevaluated numeric::int form.
  3 件のコメント
Walter Roberson
Walter Roberson 2019 年 7 月 10 日
vpaintegral()
However any numeric integral can fail as the code can detect no convergence to within available numeric accuracy. Numeric integration across a singularity is not any more possible than theoretical integration across the singularity.
XIONG Qingxiang
XIONG Qingxiang 2019 年 7 月 10 日
Thank you very much!
That's exactly the answer what I am looking for. For the case of non-monotonic, it can work for one time, when it comes to loop, for example, two or three times, it fails. So in the case of non-monotonic, what else method should I use for integration when it's divergence?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNumeric Solvers についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by