different result of unchanged script after restart of Matlab (symbolic)
Mostrar comentarios más antiguos
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?
Respuestas (1)
Sean de Wolski
el 2 de Abr. de 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 comentario
Qwert
el 2 de Abr. de 2015
Categorías
Más información sobre Symbolic Math Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!