different result of unchanged script after restart of Matlab (symbolic)
Ältere Kommentare anzeigen
I have a script with only the following two lines:
syms x
solve(x^2)
If this script is run as first command after starting Matlab the result is:
ans = 0
0
After running some other commands the result of running the same and unchanged script is:
ans =
[1x1 empty sym]
This problem occured during a beginner's course at university. It occured on different computers all running openSuse. Clearing the workspace did not solve the issue.
My question is: Is this a bug or what exactly (other than the workspace) should be cleared or changed to get the expected (first) result?
Antworten (1)
Sean de Wolski
am 2 Apr. 2015
Whenever you run any command without assigning its output to a variable, the output is assigned to ans
>>5
>>magic(3)
If you want to store it for later, assign it to a variable rather than using the default:
>> x = 5
>> y = magic(3)
1 Kommentar
Qwert
am 2 Apr. 2015
Kategorien
Mehr zu Symbolic Math Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!