How to show the value of sym in workspace?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I want to get the result of a definite integral, for example:
syms u
int(u-1,0,1)
If I type the code in the editor and run, I will get a sym for the answer. But the specific answer will show if I do in the command window. Since I will use the result afterwards, how to show the value in workspace when coding in editor?
0 Kommentare
Antworten (2)
Star Strider
am 6 Feb. 2018
I am not certain what you are asking.
One option is to assign it to a variable:
syms u
Uint = int(u-1,0,1)
Uint =
-1/2
0 Kommentare
Yixin Yao
am 26 Apr. 2018
try the function double.
syms x k = int(x^2,0,l); Kvalue = double(k); then you will see that Kvalue is value type in workspace
0 Kommentare
Siehe auch
Kategorien
Mehr zu Conversion Between Symbolic and Numeric finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!