Scilab-Branch-6.1-GIT
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
coth
hyperbolic cotangent
Syntax
t = coth(x)
Arguments
- x
vector or matrix of real or complex numbers (full or sparse-encoded).
- t
a full-encoded vector or matrix of real or complex numbers.
Description
The elements of t
are the hyperbolic
cotangent of elements of x
.
coth(0) not being 0, the result for any input
sparse-encoded matrix is always full-encoded (as for cos() ). |
Examples
x = [1, 2*%i] t = exp(x); (t-ones(x)./t).\(t+ones(x)./t) coth(x) coth([-0 0]) // With sparses: s = sparse([1 1; 3 1; 2 2; 2 3; 1 3],[0.02 0.7 0.15 0.4 3],[3 3]) coth(s) // no longer sparse
--> (t-ones(x)./t).\(t+ones(x)./t) ans = 1.3130353 0.4576576i --> coth(x) ans = 1.3130353 0.4576576i --> coth([-0 0]) ans = -Inf Inf --> // With sparses: --> s = sparse([1 1; 3 1; 2 2; 2 3; 1 3],[0.02 0.7 0.15 0.4 3],[3 3]) s = ( 3, 3) sparse matrix ( 1, 1) 0.02 ( 1, 3) 3. ( 2, 2) 0.15 ( 2, 3) 0.4 ( 3, 1) 0.7 --> coth(s) // no longer sparse ans = 50.006666 Inf 1.0049698 Inf 6.7165918 2.6319324 1.6546216 Inf Inf
See also
- cotg — cotangent
History
Version | Description |
6.1.0 | Extension to sparse matrices. |
Report an issue | ||
<< cotg | Trigonometry | csc >> |