 DeepLearning/Tensor/sin, cos, ... - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Programming : DeepLearning Package : Tensors : Operations on Tensors : DeepLearning/Tensor/sin

DeepLearning/Tensor/sin, cos, ...

compute trigonometric functions over entries of a tensor

 Calling Sequence sin(x,opts)      cos(x,opts)      tan(x,opts) sec(x,opts)      csc(x,opts)      cot(x,opts) sinh(x,opts)     cosh(x,opts)     tanh(x,opts) sech(x,opts)     csch(x,opts)     coth(x,opts) arcsin(x,opts)   arccos(x,opts)   arctan(x,opts) arcsec(x,opts)   arccsc(x,opts)   arccot(x,opts) arcsinh(x,opts)  arccosh(x,opts)  arctanh(x,opts) arcsech(x,opts)  arccsch(x,opts)  arccoth(x,opts) arctan(y,x,opts)

Parameters

 x - Tensor y - Tensor opts - zero or more options as specified below

Options

 • name=string

The value of option name specifies an optional name for this Tensor, to be displayed in output and when visualizing the dataflow graph.

Description

 • The sin(x,opts) command computes the sine of elements across a Tensor.
 • The cos(x,opts) command computes the cosine of elements across a Tensor.
 • The tan(x,opts) command computes the tangent of elements across a Tensor.
 • The sec(x,opts) command computes the secant of elements across a Tensor.
 • The csc(x,opts) command computes the cosecant of elements across a Tensor.
 • The cot(x,opts) command computes the cotangent of elements across a Tensor.
 • The sinh(x,opts) command computes the hyperbolic sine of elements across a Tensor.
 • The cosh(x,opts) command computes the hyperbolic cosine of elements across a Tensor.
 • The tanh(x,opts) command computes the hyperbolic tangent of elements across a Tensor.
 • The sech(x,opts) command computes the hyperbolic secant of elements across a Tensor.
 • The csch(x,opts) command computes the hyperbolic cosecant of elements across a Tensor.
 • The coth(x,opts) command computes the hyperbolic cotangent of elements across a Tensor.
 • The arcsin, arccos, arctan, arcsec, arccsc, and arccot commands compute the inverse trigonometric functions.
 • The arcsinh, arccosh, arctanh, arcsech, arccsch, and arccoth commands compute the inverse hyperbolic trigonometric functions.
 • The arctan(y,x) computes the inverse tangent of y/x, similar to arctan.

Examples

 > $\mathrm{with}\left(\mathrm{DeepLearning}\right):$
 > $x≔\mathrm{Constant}\left(\left[0.,1.57,3.141592,5.7\right],\mathrm{datatype}=\mathrm{float}\left[4\right]\right):$
 > $\mathrm{sess}≔\mathrm{Session}\left(\right)$
 ${\mathrm{sess}}{≔}\left[\begin{array}{c}{\mathrm{DeepLearning Session}}\\ {\mathrm{}}\end{array}\right]$ (1)
 > $\mathrm{sess}:-\mathrm{Run}\left(\mathrm{sin}\left(x\right)\right)$
 $\left[\begin{array}{c}{0.}\\ {0.999999701976776}\\ {6.27832946520357}{}{{10}}^{{-7}}\\ {-0.550685703754425}\end{array}\right]$ (2)
 > $\mathrm{sess}:-\mathrm{Run}\left(\mathrm{sech}\left(x\right)\right)$
 $\left[\begin{array}{c}{1.}\\ {0.398827970027924}\\ {0.0862667858600616}\\ {0.00669185724109411}\end{array}\right]$ (3)

Compatibility

 • The DeepLearning/Tensor/sin, cos, ... command was introduced in Maple 2018.
 • For more information on Maple 2018 changes, see Updates in Maple 2018.

 See Also