annotate scripts/elfun/acscd.m @ 23220:092078913d54

maint: Merge stable to default.
author John W. Eaton <jwe@octave.org>
date Wed, 22 Feb 2017 12:58:07 -0500
parents ef4d915df748 3ac9f9ecfae5
children 194eb4bd202b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23219
3ac9f9ecfae5 maint: Update copyright dates.
John W. Eaton <jwe@octave.org>
parents: 23083
diff changeset
1 ## Copyright (C) 2006-2017 David Bateman
6239
82185e38eea8 [project @ 2007-01-10 22:53:58 by jwe]
jwe
parents:
diff changeset
2 ##
6440
98ee80702bca [project @ 2007-03-23 15:13:19 by jwe]
jwe
parents: 6239
diff changeset
3 ## This file is part of Octave.
6239
82185e38eea8 [project @ 2007-01-10 22:53:58 by jwe]
jwe
parents:
diff changeset
4 ##
6440
98ee80702bca [project @ 2007-03-23 15:13:19 by jwe]
jwe
parents: 6239
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
98ee80702bca [project @ 2007-03-23 15:13:19 by jwe]
jwe
parents: 6239
diff changeset
6 ## under the terms of the GNU General Public License as published by
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22323
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22323
diff changeset
8 ## (at your option) any later version.
6440
98ee80702bca [project @ 2007-03-23 15:13:19 by jwe]
jwe
parents: 6239
diff changeset
9 ##
98ee80702bca [project @ 2007-03-23 15:13:19 by jwe]
jwe
parents: 6239
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
98ee80702bca [project @ 2007-03-23 15:13:19 by jwe]
jwe
parents: 6239
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22323
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22323
diff changeset
13 ## GNU General Public License for more details.
6239
82185e38eea8 [project @ 2007-01-10 22:53:58 by jwe]
jwe
parents:
diff changeset
14 ##
82185e38eea8 [project @ 2007-01-10 22:53:58 by jwe]
jwe
parents:
diff changeset
15 ## You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6440
diff changeset
16 ## along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6440
diff changeset
17 ## <http://www.gnu.org/licenses/>.
6239
82185e38eea8 [project @ 2007-01-10 22:53:58 by jwe]
jwe
parents:
diff changeset
18
82185e38eea8 [project @ 2007-01-10 22:53:58 by jwe]
jwe
parents:
diff changeset
19 ## -*- texinfo -*-
20852
516bb87ea72e 2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents: 19697
diff changeset
20 ## @deftypefn {} {} acscd (@var{x})
9155
ad20b967e1c9 Update section 17.3 (Trigonometry) of arith.txi
Rik <rdrider0-list@yahoo.com>
parents: 7017
diff changeset
21 ## Compute the inverse cosecant in degrees for each element of @var{x}.
ad20b967e1c9 Update section 17.3 (Trigonometry) of arith.txi
Rik <rdrider0-list@yahoo.com>
parents: 7017
diff changeset
22 ## @seealso{cscd, acsc}
6239
82185e38eea8 [project @ 2007-01-10 22:53:58 by jwe]
jwe
parents:
diff changeset
23 ## @end deftypefn
82185e38eea8 [project @ 2007-01-10 22:53:58 by jwe]
jwe
parents:
diff changeset
24
7017
a1dbe9d80eee [project @ 2007-10-12 21:27:11 by jwe]
jwe
parents: 7016
diff changeset
25 ## Author: David Bateman <dbateman@free.fr>
a1dbe9d80eee [project @ 2007-10-12 21:27:11 by jwe]
jwe
parents: 7016
diff changeset
26
6239
82185e38eea8 [project @ 2007-01-10 22:53:58 by jwe]
jwe
parents:
diff changeset
27 function y = acscd (x)
14220
5a13a75c2457 Use Octave spacing conventions for scripts in elfun/ directory.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
28
6239
82185e38eea8 [project @ 2007-01-10 22:53:58 by jwe]
jwe
parents:
diff changeset
29 if (nargin != 1)
82185e38eea8 [project @ 2007-01-10 22:53:58 by jwe]
jwe
parents:
diff changeset
30 print_usage ();
82185e38eea8 [project @ 2007-01-10 22:53:58 by jwe]
jwe
parents:
diff changeset
31 endif
14220
5a13a75c2457 Use Octave spacing conventions for scripts in elfun/ directory.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
32
5a13a75c2457 Use Octave spacing conventions for scripts in elfun/ directory.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
33 y = acsc (x) .* 180 ./ pi;
5a13a75c2457 Use Octave spacing conventions for scripts in elfun/ directory.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
34
6239
82185e38eea8 [project @ 2007-01-10 22:53:58 by jwe]
jwe
parents:
diff changeset
35 endfunction
82185e38eea8 [project @ 2007-01-10 22:53:58 by jwe]
jwe
parents:
diff changeset
36
14220
5a13a75c2457 Use Octave spacing conventions for scripts in elfun/ directory.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
37
14363
f3d52523cde1 Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents: 14220
diff changeset
38 %!assert (acscd (0:10:90), 180/pi * acsc (0:10:90), -10*eps)
14220
5a13a75c2457 Use Octave spacing conventions for scripts in elfun/ directory.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
39
5a13a75c2457 Use Octave spacing conventions for scripts in elfun/ directory.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
40 %!error acscd ()
5a13a75c2457 Use Octave spacing conventions for scripts in elfun/ directory.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
41 %!error acscd (1, 2)