annotate scripts/plot/draw/lightangle.m @ 29359:7854d5752dd2

maint: merge stable to default.
author John W. Eaton <jwe@octave.org>
date Wed, 10 Feb 2021 10:10:40 -0500
parents 41c54377d67f 0a5b15007766
children 796f54d4ddbf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
1 ########################################################################
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
2 ##
29358
0a5b15007766 update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 28172
diff changeset
3 ## Copyright (C) 2019-2021 The Octave Project Developers
27918
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 26995
diff changeset
4 ##
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
5 ## See the file COPYRIGHT.md in the top-level directory of this
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
6 ## distribution or <https://octave.org/copyright/>.
26545
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
7 ##
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
8 ## This file is part of Octave.
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
9 ##
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
10 ## Octave is free software: you can redistribute it and/or modify it
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
11 ## under the terms of the GNU General Public License as published by
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
12 ## the Free Software Foundation, either version 3 of the License, or
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
13 ## (at your option) any later version.
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
14 ##
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
15 ## Octave is distributed in the hope that it will be useful, but
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
16 ## WITHOUT ANY WARRANTY; without even the implied warranty of
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
17 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
18 ## GNU General Public License for more details.
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
19 ##
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
20 ## You should have received a copy of the GNU General Public License
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
21 ## along with Octave; see the file COPYING. If not, see
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
22 ## <https://www.gnu.org/licenses/>.
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
23 ##
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
24 ########################################################################
26545
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
25
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
26 ## -*- texinfo -*-
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
27 ## @deftypefn {} {} lightangle (@var{az}, @var{el})
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
28 ## @deftypefnx {} {} lightangle (@var{hax}, @var{az}, @var{el})
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
29 ## @deftypefnx {} {} lightangle (@var{hl}, @var{az}, @var{el})
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
30 ## @deftypefnx {} {@var{hl} =} lightangle (@dots{})
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
31 ## @deftypefnx {} {[@var{az}, @var{el}] =} lightangle (@var{hl})
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
32 ## Add a light object to the current axes using spherical coordinates.
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
33 ##
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
34 ## The light position is specified by an azimuthal rotation @var{az} and an
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
35 ## elevation angle @var{el}, both in degrees.
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
36 ##
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
37 ## If the first argument @var{hax} is an axes handle, then create a new light
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
38 ## object in this axes, rather than the current axes returned by @code{gca}.
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
39 ##
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
40 ## If the first argument @var{hl} is a handle to a light object, then act on
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
41 ## this light object rather than creating a new object.
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
42 ##
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
43 ## The optional return value @var{hl} is a graphics handle to the light object.
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
44 ##
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
45 ## Example:
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
46 ##
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
47 ## Add a light object to a plot
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
48 ##
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
49 ## @example
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
50 ## @group
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
51 ## @c doctest: +SKIP
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
52 ## clf;
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
53 ## sphere (36);
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
54 ## lightangle (45, 30);
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
55 ## @end group
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
56 ## @end example
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
57 ##
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
58 ## @seealso{light, view, camlight}
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
59 ## @end deftypefn
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
60
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
61 function varargout = lightangle (varargin)
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
62
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
63 if (nargin == 0 || nargin > 3 || nargout > 2 || (nargin > 1 && nargout > 1))
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
64 print_usage ();
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
65 endif
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
66
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
67 hl = hax = az = el = [];
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
68
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
69 if (nargin == 1)
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
70 hl = varargin{1};
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
71 if (! isscalar (hl) || ! isgraphics (hl, "light"))
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
72 error ("lightangle: HL must be a handle to a light object");
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
73 endif
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
74 elseif (nargin == 2)
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
75 az = varargin{1};
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
76 el = varargin{2};
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
77 elseif (nargin == 3)
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
78 h = varargin{1};
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
79 if (isscalar (h) && isaxes (h))
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
80 hax = h;
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
81 elseif (isscalar (h) && isgraphics (h, "light"))
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
82 hl = h;
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
83 else
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
84 error ("lightangle: H must be a handle to an axes or light object");
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
85 endif
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
86 az = varargin{2};
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
87 el = varargin{3};
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
88 endif
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
89
26591
26a3861a34b6 lightangle.m: review new function (bug #55446).
Rik <rik@octave.org>
parents: 26545
diff changeset
90 if (nargin == 1)
26a3861a34b6 lightangle.m: review new function (bug #55446).
Rik <rik@octave.org>
parents: 26545
diff changeset
91 pos = get (hl, "Position");
26a3861a34b6 lightangle.m: review new function (bug #55446).
Rik <rik@octave.org>
parents: 26545
diff changeset
92 [az, el] = cart2sph (pos(1), pos(2), pos(3));
26a3861a34b6 lightangle.m: review new function (bug #55446).
Rik <rik@octave.org>
parents: 26545
diff changeset
93 az = rad2deg (az) + 90; # see view.m
26a3861a34b6 lightangle.m: review new function (bug #55446).
Rik <rik@octave.org>
parents: 26545
diff changeset
94 el = rad2deg (el);
26a3861a34b6 lightangle.m: review new function (bug #55446).
Rik <rik@octave.org>
parents: 26545
diff changeset
95 varargout = { az, el };
26a3861a34b6 lightangle.m: review new function (bug #55446).
Rik <rik@octave.org>
parents: 26545
diff changeset
96 return;
26995
ab5bfee22d18 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 26591
diff changeset
97 endif
26591
26a3861a34b6 lightangle.m: review new function (bug #55446).
Rik <rik@octave.org>
parents: 26545
diff changeset
98
26a3861a34b6 lightangle.m: review new function (bug #55446).
Rik <rik@octave.org>
parents: 26545
diff changeset
99 if (! isscalar (az) || ! isnumeric (az)
26a3861a34b6 lightangle.m: review new function (bug #55446).
Rik <rik@octave.org>
parents: 26545
diff changeset
100 || ! isscalar (el) || ! isnumeric (el))
26a3861a34b6 lightangle.m: review new function (bug #55446).
Rik <rik@octave.org>
parents: 26545
diff changeset
101 error ("lightangle: AZ and EL must be numeric scalars");
26a3861a34b6 lightangle.m: review new function (bug #55446).
Rik <rik@octave.org>
parents: 26545
diff changeset
102 endif
26a3861a34b6 lightangle.m: review new function (bug #55446).
Rik <rik@octave.org>
parents: 26545
diff changeset
103
26545
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
104 if (! isempty (hl))
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
105 hax = ancestor (hl, "axes");
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
106 endif
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
107
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
108 if (isempty (hax))
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
109 hax = gca ();
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
110 endif
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
111
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
112 if (isempty (hl))
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
113 hl = light (hax);
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
114 endif
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
115
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
116 pos = get (hl, "Position");
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
117
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
118 az = deg2rad (az - 90);
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
119 el = deg2rad (el);
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
120
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
121 if (strcmp (get (hl, "Style"), "local"))
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
122 pos -= get (hax, "CameraTarget");
26995
ab5bfee22d18 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 26591
diff changeset
123 endif
26545
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
124
28171
a23da76e0693 Matlab compatibility fixes for coordinate transform functions (bug #57794).
Nicholas R. Jankowski <jankowskin@asme.org>
parents: 27923
diff changeset
125 [pos(1), pos(2), pos(3)] = sph2cart (az, el, norm (pos));
26545
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
126
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
127 if (strcmp (get (hl, "Style"), "local"))
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
128 pos += get (hax, "CameraTarget");
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
129 endif
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
130
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
131 set (hl, "Position", pos);
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
132
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
133 if (nargout == 1)
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
134 varargout = { hl };
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
135 endif
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
136
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
137 endfunction
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
138
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
139
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
140 %!demo
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
141 %! clf;
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
142 %! sphere (36);
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
143 %! lightangle (45, 30);
28172
65ddd575a5f5 lightangle.m: Add title to demo figure.
Rik <rik@octave.org>
parents: 27923
diff changeset
144 %! title ("lightangle() demo #1");
26545
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
145
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
146 %!test
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
147 %! hf = figure ("visible", "off");
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
148 %! unwind_protect
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
149 %! sphere (24);
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
150 %! hl = lightangle (45, 20);
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
151 %! assert (isgraphics (hl, "light"));
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
152 %! [az, el] = lightangle (hl);
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
153 %! assert ([45, 20], [az, el], -20*eps);
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
154 %! lightangle (hl, 90, 45);
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
155 %! [az, el] = lightangle (hl);
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
156 %! assert ([90, 45], [az, el], -20*eps);
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
157 %! pos = get (hl, "Position");
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
158 %! assert ([1, 0, 1], pos, -20*eps);
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
159 %! hl = lightangle (gca (), 45, 20);
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
160 %! assert (isgraphics (hl, "light"));
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
161 %! unwind_protect_cleanup
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
162 %! close (hf);
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
163 %! end_unwind_protect
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
164
aea4e66eb331 New function lightangle (bug #55446).
Guillaume Flandin
parents:
diff changeset
165 ## Test input validation
26591
26a3861a34b6 lightangle.m: review new function (bug #55446).
Rik <rik@octave.org>
parents: 26545
diff changeset
166 %!error <Invalid call> lightangle ()
26a3861a34b6 lightangle.m: review new function (bug #55446).
Rik <rik@octave.org>
parents: 26545
diff changeset
167 %!error <Invalid call> lightangle (1, 2, 3, 4)
28895
41c54377d67f maint: remove unnecessary checks on nargout in m-files.
Rik <rik@octave.org>
parents: 28176
diff changeset
168 %!error <Invalid call> [a, b, c] = lightangle (45, 30)
26591
26a3861a34b6 lightangle.m: review new function (bug #55446).
Rik <rik@octave.org>
parents: 26545
diff changeset
169 %!error <Invalid call> [a, b] = lightangle (45, 30)
26a3861a34b6 lightangle.m: review new function (bug #55446).
Rik <rik@octave.org>
parents: 26545
diff changeset
170 %!error <HL must be a handle to a light object> lightangle (0)
26a3861a34b6 lightangle.m: review new function (bug #55446).
Rik <rik@octave.org>
parents: 26545
diff changeset
171 %!error <H must be a handle to an axes or light object> lightangle (0, 90, 45)
26995
ab5bfee22d18 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 26591
diff changeset
172 %!error <AZ and EL must be numeric scalars> lightangle ([1 2], 0)
ab5bfee22d18 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 26591
diff changeset
173 %!error <AZ and EL must be numeric scalars> lightangle ({1}, 0)
ab5bfee22d18 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 26591
diff changeset
174 %!error <AZ and EL must be numeric scalars> lightangle (0, [1 2])
ab5bfee22d18 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 26591
diff changeset
175 %!error <AZ and EL must be numeric scalars> lightangle (0, {1})