solve returns variable name instead of value

When running the solve() command, no matter how complex or simple, it will return the variable name instead of its value.

 採用された回答

Frederik Jensen
Frederik Jensen 2021 年 5 月 18 日

0 投票

Solved it by uninstalling the Maple toolbox, i had the two accounts connected and it somehow caused trouble.
It can be unsinstalled through the "Programs and Features" menu in the Control Panel.

その他の回答 (1 件)

Rik
Rik 2021 年 5 月 17 日

0 投票

This is exactly as documented.
syms x
result=solve(4 == 2+x,x)
result = 
2
res=double(result) %convert symbolic to double
res = 2

7 件のコメント

Frederik Jensen
Frederik Jensen 2021 年 5 月 17 日
This just gives me an error:
Frederik Jensen
Frederik Jensen 2021 年 5 月 17 日
To ellaborate; The result variable contains the value "x", it is not the value 2 as you're getting. I'm fearing i may have change a setting somewhere, somehow.
Rik
Rik 2021 年 5 月 17 日
Which release are you using?
Star Strider
Star Strider 2021 年 5 月 17 日
What MATLAB version/release are you using? I believe the last Maple engine for the Symbolic Math Toolbox was 2009. Alternatively, if you have Maple installed on your computer, there could be conflicts with the MATLAB Symbolic Math Toolbox.
Frederik Jensen
Frederik Jensen 2021 年 5 月 17 日
My version is:
MATLAB Version: 9.8.0.1396136 (R2020a) Update 3
I do have Maple installed
Rik
Rik 2021 年 5 月 18 日
I don't have a license for the symbolic toolbox or Maple, so I can't reproduce your system. I can only run code from the symbolic toolbox in Answers.
Frederik Jensen
Frederik Jensen 2021 年 5 月 18 日
Solved it by uninstalling the Maple toolbox, i had the two accounts connected and it somehow caused trouble.

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

製品

リリース

R2020a

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by