different result of unchanged script after restart of Matlab (symbolic)
Afficher commentaires plus anciens
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?
Réponses (1)
Sean de Wolski
le 2 Avr 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 commentaire
Qwert
le 2 Avr 2015
Catégories
En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!