How to check the symbolic engine of matlab2018?

7 ビュー (過去 30 日間)
haohaoxuexi1
haohaoxuexi1 2021 年 7 月 31 日
コメント済み: Walter Roberson 2021 年 8 月 1 日
I have intalled maple (maple toolbox as well) in my computer. And I am trying to switch the engine between in order to get better calculation performance.
When I tried to type "symengine" in the command window, it returns "Undefined function or variable 'symengine'. "
Can anyone tell me the correct command to check the symbolic engine Matlab currently using?
Thanks,
  2 件のコメント
Cris LaPierre
Cris LaPierre 2021 年 8 月 1 日
Do you have the Symbolic Math Toolbox installed? symengine is a function in that toolbox.
haohaoxuexi1
haohaoxuexi1 2021 年 8 月 1 日
I think so, but i installed maple as well, i am not sure if the system took the maple engine by default. And if yes, is the "symengine" is still able to use or not?

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

回答 (1 件)

Walter Roberson
Walter Roberson 2021 年 8 月 1 日

If you are trying to determine whether you are using maple based symbolic toolbox or the MuPad based one then you cannot use symengine by itself and you cannot easily switch between maple and mupad engines.

For a few releases after MuPad was introduced, symengine could be used to switch between the maple based engine and MuPad engine. However that was removed before r2010a (I would have to check exactly which release)

So, your options include:

  • use which to determine whether a function exists which is present in maple engine but not MuPad (or the other way around)
  • use which('syms') and analyze the directory to see which engine is serving you
  • use try/catch to determine which one you have

Now if you want to switch between maple and MuPad engines, you need to adjust the matlab path, as the ability to switch by command was removed.

  2 件のコメント
haohaoxuexi1
haohaoxuexi1 2021 年 8 月 1 日
"If you are trying to determine whether you are using maple based symbolic toolbox or the MuPad based one"
Correct, that is what I want to do, I want to know which one I am using. Do you know what command I should input?
Walter Roberson
Walter Roberson 2021 年 8 月 1 日
I was close, R2010a was the first release that symengine() could not be used to switch engines. https://www.mathworks.com/matlabcentral/answers/276932-how-to-change-symbolic-solver-from-maple-to-matlab#answer_216751
sympath = which('sym');
if isempty(sympath)
%no symbolic toolbox is installed at all
elseif ismember('maple', lower(regexp(sympath, '[/\\]', 'split')))
%maple
else
%mupad
end

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

カテゴリ

Help Center および File ExchangeGet Started with MuPAD についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by