Is exp() a Documented Function in the Symbolic Math Toolbox?
Afficher commentaires plus anciens
I can't find it.
3 commentaires
Sam Chak
le 27 Mai 2022
I think you already know that exp(x), like sin(x) and cos(x), is a transcendental function. They are under elementary math.
So, I am wondering if you want to define the exponential function symbolically.
Paul
le 27 Mai 2022
Yes, it's strange. Even symbolic log(X) is documented.
syms x
y = cos(x)
x = pi;
subs(y)
ans =
-1
syms x
y = exp(x)
x = pi;
subs(y)
ans =
exp(pi)
Réponses (3)
There is no separate documentation page for the exp method for sym objects, this is true. Not all methods of classes have documentation pages, and I believe this is especially true if the methods have very similar or the same behavior as the versions of the functions for double and single precision data. In fact if you look at the list of function reference pages for exp that appear on the first page of a search, the only three that show up are the double/single precision version in MATLAB, the quaternion version in a number of different toolboxes, and the fints version in Financial Toolbox (which is discouraged because fints is discouraged, with timetable being the recommended replacement.) There are more than just those three overloads.
which -all exp
If you want to see the operations defined for sym objects you can ask MATLAB what methods are defined for that class. Note that this doesn't list all the operations you can perform on sym objects, as some MATLAB functions will operate on instances of a class as long as all the operations the function uses work on that class. For example the var function is not overloaded for sym but because all of the functions var.m uses work for sym you can compute the var of a symbolic vector.
which -all var % No sym overload
var(1:5)
var(sym(1:5)) % But it works
methods sym
1 commentaire
Paul
le 27 Mai 2022
Image Analyst
le 27 Mai 2022
Type
which -all exp
to find out.
Walter Roberson
le 27 Mai 2022
There is no doc for it.
help sym/exp
gives very brief help (nearly useless)
1 commentaire
Catégories
En savoir plus sur Operations on Strings 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!