Hi if I use the solve function it doesnt work, like on my colleagues computer.
Here an example:
>> syms x
>> d=solve(x*5+15,x)
d =
-3
>> d=solve(x*5+15==0,x)
d =
x
somehow I get d=-3 when I let the ==0 out, but this makes no sense to me.
Even when I use the example from the help Page
syms x
eqn = sin(x) == 1;
solx = solve(eqn,x)
my result is solx=x
Has anyone an Idea, what I am doing wrong? Maybe some settings I need to change?
Thank you for your help

 採用された回答

madhan ravi
madhan ravi 2018 年 12 月 12 日
編集済み: madhan ravi 2018 年 12 月 12 日

0 投票

Try clear all at the very beginning and run your code , you are overwriting the variable which leads to confusion. FYI I got the correct results using your code without any flaws.

4 件のコメント

Dorian Jaggi
Dorian Jaggi 2018 年 12 月 12 日
I already tried that and restartet the programm and everything. Maybe I need to reinstall it and hope for the best. Because as I mentioned it, it works on my colleagues computers excactly as it should, but not on mine.
Unbenannt.PNG
madhan ravi
madhan ravi 2018 年 12 月 12 日
編集済み: madhan ravi 2018 年 12 月 12 日
It can also happen that you have custom made function solve ? if so rename it or delete it. It’s better you contact Mathworks Technical Support team by clicking the Contact Us button on the top right corner of this page.
Dorian Jaggi
Dorian Jaggi 2018 年 12 月 15 日
Hi, I did not create a custom made fucntion. But I just reinstalled everything and now its working again.
madhan ravi
madhan ravi 2018 年 12 月 15 日
Glad it worked.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

質問済み:

2018 年 12 月 12 日

コメント済み:

2018 年 12 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by