File tree Expand file tree Collapse file tree 1 file changed +82
-1
lines changed
lib/node_modules/@stdlib/math/base/special/cosc Expand file tree Collapse file tree 1 file changed +82
-1
lines changed Original file line number Diff line number Diff line change @@ -18,4 +18,85 @@ limitations under the License.
1818
1919-->
2020
21- # Computes derivative of the cardinal sine function
21+ # cosc
22+
23+ > Compute the derivative of the [ cardinal sine] [ sinc ] of a number.
24+
25+ <section class =" intro " >
26+
27+ The derivative of the normalized [ cardinal sine] [ sinc ] function is defined as
28+
29+ ` { cosc(x) = (cos( PI*x ) - sin( PI*x )/(PI*x)) / x } if x != 0, and 0 if x == 0 `
30+
31+
32+ <!-- </equation> -->
33+
34+ for any real number ` x ` .
35+
36+ </section >
37+
38+ <!-- /.intro -->
39+
40+ <section class =" usage " >
41+
42+ ## Usage
43+
44+ ``` javascript
45+ var cosc = require ( ' @stdlib/math/base/special/cosc' );
46+ ```
47+
48+ #### cosc( x )
49+
50+ Computes the derivative of the normalized [ cardinal sine] [ sinc ] of a ` number ` .
51+
52+ ``` javascript
53+ var v = cosc ( 0.5 );
54+
55+ // Return ~-1.273
56+
57+ var x = cosc ( - 1.2 );
58+
59+ // Return ~0.544
60+
61+ var y = cosc ( 0.0 );
62+
63+ // Return 0
64+
65+ var z = cosc ( NaN );
66+
67+ // Return NaN
68+ ```
69+
70+ </section >
71+
72+ <!-- /.usage -->
73+
74+ <section class =" examples " >
75+
76+ ## Examples
77+
78+ <!-- eslint no-undef: "error" -->
79+
80+ ``` javascript
81+ var linspace = require ( ' @stdlib/math/utils/linspace' );
82+ var cosc = require ( ' @stdlib/math/base/special/cosc' );
83+
84+ var x = linspace ( - 5.0 , 5.0 , 100 );
85+ var i;
86+
87+ for ( i = 0 ; i < x .length ; i++ ) {
88+ console .log ( cosc ( x[ i ] ) );
89+ }
90+ ```
91+
92+ </section >
93+
94+ <!-- /.examples -->
95+
96+ <section class =" links " >
97+
98+ [ sinc ] : https://en.wikipedia.org/wiki/Sinc_function
99+
100+ </section >
101+
102+ <!-- /.links -->
You can’t perform that action at this time.
0 commit comments