Mercurial > octave
annotate scripts/plot/draw/quiver3.m @ 33632:fed0dc6fd44c default tip
remove unused variable from libgui/module.mk
* libgui/module.mk: remove empty variable OCTAVE_GUI_EDITOR_MOC
author | Torsten Lilge <ttl-octave@mailbox.org> |
---|---|
date | Mon, 27 May 2024 19:42:05 +0200 |
parents | 2e484f9f1f18 |
children |
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 ## |
32632
2e484f9f1f18
maint: update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
32501
diff
changeset
|
3 ## Copyright (C) 2007-2024 The Octave Project Developers |
27918
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
26834
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/>. |
7189 | 7 ## |
8 ## This file is part of Octave. | |
9 ## | |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
24432
diff
changeset
|
10 ## Octave is free software: you can redistribute it and/or modify it |
7189 | 11 ## under the terms of the GNU General Public License as published by |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
24432
diff
changeset
|
12 ## the Free Software Foundation, either version 3 of the License, or |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22367
diff
changeset
|
13 ## (at your option) any later version. |
7189 | 14 ## |
15 ## Octave is distributed in the hope that it will be useful, but | |
16 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22367
diff
changeset
|
17 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22367
diff
changeset
|
18 ## GNU General Public License for more details. |
7189 | 19 ## |
20 ## You should have received a copy of the GNU General Public License | |
21 ## along with Octave; see the file COPYING. If not, see | |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
24432
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 ######################################################################## |
7189 | 25 |
26 ## -*- texinfo -*- | |
26834
e07ea25d58f5
quiver3.m: Fix texinfo typo in docstring from cset f7b10bd40045.
Rik <rik@octave.org>
parents:
26831
diff
changeset
|
27 ## @deftypefn {} {} quiver3 (@var{x}, @var{y}, @var{z}, @var{u}, @var{v}, @var{w}) |
e07ea25d58f5
quiver3.m: Fix texinfo typo in docstring from cset f7b10bd40045.
Rik <rik@octave.org>
parents:
26831
diff
changeset
|
28 ## @deftypefnx {} {} quiver3 (@var{z}, @var{u}, @var{v}, @var{w}) |
20852
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20181
diff
changeset
|
29 ## @deftypefnx {} {} quiver3 (@dots{}, @var{s}) |
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20181
diff
changeset
|
30 ## @deftypefnx {} {} quiver3 (@dots{}, @var{style}) |
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20181
diff
changeset
|
31 ## @deftypefnx {} {} quiver3 (@dots{}, "filled") |
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20181
diff
changeset
|
32 ## @deftypefnx {} {} quiver3 (@var{hax}, @dots{}) |
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20181
diff
changeset
|
33 ## @deftypefnx {} {@var{h} =} quiver3 (@dots{}) |
7189 | 34 ## |
20173
777f26aa8e3e
doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
35 ## Plot a 3-D vector field with arrows. |
20181
aa36fb998a4d
maint: Remove unnecessary whitespace at end of lines.
Rik <rik@octave.org>
parents:
20173
diff
changeset
|
36 ## |
24381
6915cc404dba
doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents:
23219
diff
changeset
|
37 ## Plot the (@var{u}, @var{v}, @var{w}) components of a vector field at the |
6915cc404dba
doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents:
23219
diff
changeset
|
38 ## grid points defined by (@var{x}, @var{y}, @var{z}). If the grid is uniform |
32074
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
39 ## then @var{x}, @var{y}, and @var{z} can be specified as grid vectors and |
24381
6915cc404dba
doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents:
23219
diff
changeset
|
40 ## @code{meshgrid} is used to create the 3-D grid. |
7189 | 41 ## |
26831
677764865056
Accept 4-input form for quiver3 (bug #55570).
Rik <rik@octave.org>
parents:
26376
diff
changeset
|
42 ## If @var{x} and @var{y} are not given they are assumed to be |
677764865056
Accept 4-input form for quiver3 (bug #55570).
Rik <rik@octave.org>
parents:
26376
diff
changeset
|
43 ## @code{(1:@var{m}, 1:@var{n})} where |
677764865056
Accept 4-input form for quiver3 (bug #55570).
Rik <rik@octave.org>
parents:
26376
diff
changeset
|
44 ## @code{[@var{m}, @var{n}] = size (@var{u})}. |
7189 | 45 ## |
24381
6915cc404dba
doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents:
23219
diff
changeset
|
46 ## The optional input @var{s} is a scalar defining a scaling factor to use for |
6915cc404dba
doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents:
23219
diff
changeset
|
47 ## the arrows of the field relative to the mesh spacing. A value of 1.0 will |
6915cc404dba
doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents:
23219
diff
changeset
|
48 ## result in the longest vector exactly filling one grid cube. A value of 0 |
32487
998cba4600e9
doc: grammarcheck m-files before 9.1 release.
Rik <rik@octave.org>
parents:
32074
diff
changeset
|
49 ## or @qcode{"off"} disables all scaling. The default value is 0.9. |
7189 | 50 ## |
51 ## The style to use for the plot can be defined with a line style @var{style} | |
24381
6915cc404dba
doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents:
23219
diff
changeset
|
52 ## of the same format as the @code{plot} command. If a marker is specified |
6915cc404dba
doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents:
23219
diff
changeset
|
53 ## then the markers are drawn at the origin of the vectors (which are the grid |
6915cc404dba
doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents:
23219
diff
changeset
|
54 ## points defined by @var{x}, @var{y}, @var{z}). When a marker is specified, |
6915cc404dba
doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents:
23219
diff
changeset
|
55 ## the arrowhead is not drawn. If the argument @qcode{"filled"} is given then |
32074
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
56 ## the markers are filled. If name-value plot style properties are used, they |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
57 ## must appear in pairs and follow any other plot style arguments. |
7189 | 58 ## |
24431
0c6cedafc71e
doc: Use 'axes' rather than 'axis' appropriately in docstrings.
Rik <rik@octave.org>
parents:
24381
diff
changeset
|
59 ## If the first argument @var{hax} is an axes handle, then plot into this axes, |
17161
52931d71400f
doc: Document that first argument can be an axes handle for several plot functions.
Rik <rik@octave.org>
parents:
17122
diff
changeset
|
60 ## rather than the current axes returned by @code{gca}. |
52931d71400f
doc: Document that first argument can be an axes handle for several plot functions.
Rik <rik@octave.org>
parents:
17122
diff
changeset
|
61 ## |
14001
5f0bb45e615c
doc: Update documentation for functions returning a graphics handle h (Bug #34761)
Rik <octave@nomad.inbox5.com>
parents:
11587
diff
changeset
|
62 ## The optional return value @var{h} is a graphics handle to a quiver object. |
5f0bb45e615c
doc: Update documentation for functions returning a graphics handle h (Bug #34761)
Rik <octave@nomad.inbox5.com>
parents:
11587
diff
changeset
|
63 ## A quiver object regroups the components of the quiver plot (body, arrow, |
5f0bb45e615c
doc: Update documentation for functions returning a graphics handle h (Bug #34761)
Rik <octave@nomad.inbox5.com>
parents:
11587
diff
changeset
|
64 ## and marker), and allows them to be changed together. |
7189 | 65 ## |
66 ## @example | |
67 ## @group | |
68 ## [x, y, z] = peaks (25); | |
69 ## surf (x, y, z); | |
70 ## hold on; | |
71 ## [u, v, w] = surfnorm (x, y, z / 10); | |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7245
diff
changeset
|
72 ## h = quiver3 (x, y, z, u, v, w); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7245
diff
changeset
|
73 ## set (h, "maxheadsize", 0.33); |
7189 | 74 ## @end group |
75 ## @end example | |
76 ## | |
17122
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17070
diff
changeset
|
77 ## @seealso{quiver, compass, feather, plot} |
7189 | 78 ## @end deftypefn |
79 | |
17671 | 80 function h = quiver3 (varargin) |
7189 | 81 |
17070
d465f9970c02
quiver.m, quiver3.m: Upgrade to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
16814
diff
changeset
|
82 [hax, varargin, nargin] = __plt_get_axis_arg__ ("quiver3", varargin{:}); |
7215 | 83 |
32062
ada96a467a28
quiver: Improve plotting with non-float numeric inputs (bug #59695)
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
31706
diff
changeset
|
84 if (nargin < 4) |
7189 | 85 print_usage (); |
17671 | 86 endif |
87 | |
17211
87ba70043bfc
Don't use ifelse in plot fcns to avoid unnecessary fcn evaluations.
Rik <rik@octave.org>
parents:
17161
diff
changeset
|
88 oldfig = []; |
17301
68bcac3c043a
Correct inversion accidentally introduced in cset 87ba70043bfc.
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
89 if (! isempty (hax)) |
17211
87ba70043bfc
Don't use ifelse in plot fcns to avoid unnecessary fcn evaluations.
Rik <rik@octave.org>
parents:
17161
diff
changeset
|
90 oldfig = get (0, "currentfigure"); |
87ba70043bfc
Don't use ifelse in plot fcns to avoid unnecessary fcn evaluations.
Rik <rik@octave.org>
parents:
17161
diff
changeset
|
91 endif |
17671 | 92 unwind_protect |
32074
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
93 [hax, htmp] = __quiver__ (hax, true, varargin{:}); |
17070
d465f9970c02
quiver.m, quiver3.m: Upgrade to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
16814
diff
changeset
|
94 |
22367
459545bc9019
Use ishold () rather than ishold (hax) for performance.
Rik <rik@octave.org>
parents:
22351
diff
changeset
|
95 if (! ishold ()) |
22351
e6df1ddfc3cf
Change DefaultAxesBox property to "off".
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
96 set (hax, "view", [-37.5, 30], |
17671 | 97 "xgrid", "on", "ygrid", "on", "zgrid", "on"); |
98 endif | |
99 unwind_protect_cleanup | |
100 if (! isempty (oldfig)) | |
101 set (0, "currentfigure", oldfig); | |
102 endif | |
103 end_unwind_protect | |
7189 | 104 |
105 if (nargout > 0) | |
17671 | 106 h = htmp; |
7189 | 107 endif |
108 | |
109 endfunction | |
110 | |
32501
5fac69033835
maint: Style check m-files in scripts/ directory before 9.1 release.
Rik <rik@octave.org>
parents:
32487
diff
changeset
|
111 |
7189 | 112 %!demo |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
113 %! clf; |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
21546
diff
changeset
|
114 %! colormap ("default"); |
7245 | 115 %! [x, y, z] = peaks (25); |
116 %! surf (x, y, z); | |
117 %! hold on; | |
118 %! [u, v, w] = surfnorm (x, y, z / 10); | |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7245
diff
changeset
|
119 %! h = quiver3 (x, y, z, u, v, w); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
21546
diff
changeset
|
120 %! set (h, "maxheadsize", 0.25); |
8253
873ea2c72f16
quiver3.m: turn hold off after demo
John W. Eaton <jwe@octave.org>
parents:
8056
diff
changeset
|
121 %! hold off; |
24381
6915cc404dba
doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents:
23219
diff
changeset
|
122 %! title ("quiver3() of surface normals to peaks() function"); |
8889
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8253
diff
changeset
|
123 |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8253
diff
changeset
|
124 %!demo |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
125 %! clf; |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
21546
diff
changeset
|
126 %! colormap ("default"); |
14092
22c50cbad2ce
Add clf() to all plot demos.
Ben Abbott <bpabbott@mac.com>
parents:
14001
diff
changeset
|
127 %! [x, y, z] = peaks (25); |
22c50cbad2ce
Add clf() to all plot demos.
Ben Abbott <bpabbott@mac.com>
parents:
14001
diff
changeset
|
128 %! surf (x, y, z); |
22c50cbad2ce
Add clf() to all plot demos.
Ben Abbott <bpabbott@mac.com>
parents:
14001
diff
changeset
|
129 %! hold on; |
22c50cbad2ce
Add clf() to all plot demos.
Ben Abbott <bpabbott@mac.com>
parents:
14001
diff
changeset
|
130 %! [u, v, w] = surfnorm (x, y, z / 10); |
22c50cbad2ce
Add clf() to all plot demos.
Ben Abbott <bpabbott@mac.com>
parents:
14001
diff
changeset
|
131 %! h = quiver3 (x, y, z, u, v, w); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
21546
diff
changeset
|
132 %! set (h, "maxheadsize", 0.25); |
14092
22c50cbad2ce
Add clf() to all plot demos.
Ben Abbott <bpabbott@mac.com>
parents:
14001
diff
changeset
|
133 %! hold off; |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
134 %! shading interp; |
24381
6915cc404dba
doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents:
23219
diff
changeset
|
135 %! title ({"quiver3() of surface normals to peaks() function"; ... |
17671 | 136 %! 'shading "interp"'}); |
32062
ada96a467a28
quiver: Improve plotting with non-float numeric inputs (bug #59695)
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
31706
diff
changeset
|
137 |
32074
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
138 ## Check standard inputs, single arrow. |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
139 %!test |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
140 %! hf = figure ("visible", "off"); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
141 %! hax = gca (); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
142 %! unwind_protect |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
143 %! |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
144 %! h = quiver3 (hax, 0, 1, 2, 3); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
145 %! children = get (h, "children"); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
146 %! childxdata = get (children, "xdata"); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
147 %! childydata = get (children, "ydata"); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
148 %! childzdata = get (children, "zdata"); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
149 %! stemchild = find (cellfun (@numel, childxdata) == 3); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
150 %! arrowheadchild = find (cellfun (@numel, childxdata) == 4); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
151 %! assert (childxdata{stemchild}(1), 1, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
152 %! assert (childxdata{stemchild}(2), 1 + 1*0.9, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
153 %! assert (isnan (childxdata{stemchild}(3))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
154 %! assert (childxdata{arrowheadchild}(2), 1 + 1*0.9, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
155 %! assert (isnan (childxdata{arrowheadchild}(4))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
156 %! assert (childydata{stemchild}(1), 1, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
157 %! assert (childydata{stemchild}(2), 1 + 2*0.9, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
158 %! assert (isnan (childydata{stemchild}(3))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
159 %! assert (childydata{arrowheadchild}(2), 1 + 2*0.9, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
160 %! assert (isnan (childydata{arrowheadchild}(4))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
161 %! assert (childzdata{stemchild}(1), 0, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
162 %! assert (childzdata{stemchild}(2), 0 + 3*0.9, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
163 %! assert (isnan (childzdata{stemchild}(3))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
164 %! assert (childzdata{arrowheadchild}(2), 0 + 3*0.9, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
165 %! assert (isnan (childzdata{arrowheadchild}(4))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
166 %! |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
167 %! h = quiver3 (hax, 1, 1, 0, 1, 2, 3); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
168 %! children = get (h, "children"); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
169 %! childxdata = get (children, "xdata"); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
170 %! childydata = get (children, "ydata"); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
171 %! childzdata = get (children, "zdata"); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
172 %! stemchild = find (cellfun (@numel, childxdata) == 3); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
173 %! arrowheadchild = find (cellfun (@numel, childxdata) == 4); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
174 %! assert (childxdata{stemchild}(1), 1, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
175 %! assert (childxdata{stemchild}(2), 1 + 1*0.9, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
176 %! assert (isnan (childxdata{stemchild}(3))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
177 %! assert (childxdata{arrowheadchild}(2), 1 + 1*0.9, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
178 %! assert (isnan (childxdata{arrowheadchild}(4))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
179 %! assert (childydata{stemchild}(1), 1, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
180 %! assert (childydata{stemchild}(2), 1 + 2*0.9, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
181 %! assert (isnan (childydata{stemchild}(3))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
182 %! assert (childydata{arrowheadchild}(2), 1 + 2*0.9, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
183 %! assert (isnan (childydata{arrowheadchild}(4))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
184 %! assert (childzdata{stemchild}(1), 0, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
185 %! assert (childzdata{stemchild}(2), 0 + 3*0.9, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
186 %! assert (isnan (childzdata{stemchild}(3))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
187 %! assert (childzdata{arrowheadchild}(2), 0 + 3*0.9, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
188 %! assert (isnan (childzdata{arrowheadchild}(4))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
189 %! unwind_protect_cleanup |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
190 %! close (hf); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
191 %! end_unwind_protect |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
192 |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
193 ## Check standard inputs, multiple arrows. |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
194 %!test |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
195 %! hf = figure ("visible", "off"); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
196 %! hax = gca (); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
197 %! unwind_protect |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
198 %! |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
199 %! a = reshape(1:12,2,3,2); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
200 %! x = 1:3; y = 1:2; z = 1:2; |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
201 %! [xx,yy,zz] = meshgrid (x,y,z); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
202 %! numpts = 12; |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
203 %! sf= sqrt(sumsq([1/3 1/2 11/6])/432); # Actual internal scale factor, z=a. |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
204 %! sf2= sqrt(sumsq([1/3 1/2 1/6])/432); # z vector internal scale factor. |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
205 %! |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
206 %! h = quiver3 (hax, a, a, a, a, 1); # No x,y input. |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
207 %! children = get (h, "children"); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
208 %! childxdata = get (children, "xdata"); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
209 %! childydata = get (children, "ydata"); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
210 %! childzdata = get (children, "zdata"); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
211 %! basechild = find (cellfun (@numel, childxdata) == numpts); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
212 %! stemchild = find (cellfun (@numel, childxdata) == numpts*3); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
213 %! arrowheadchild = find (cellfun (@numel, childxdata) == numpts*4); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
214 %! ## Check all bases. |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
215 %! assert (childxdata{basechild}, [1, 1, 2, 2, 3, 3, 1, 1, 2, 2, 3, 3]); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
216 %! assert (childydata{basechild}, [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
217 %! assert (childzdata{basechild}, [1:12]); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
218 %! ## Check first arrow. |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
219 %! assert (childxdata{stemchild}(1), 1, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
220 %! assert (childxdata{stemchild}(2), 1 + 1*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
221 %! assert (isnan (childxdata{stemchild}(3))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
222 %! assert (childxdata{arrowheadchild}(2), 1 + 1*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
223 %! assert (isnan (childxdata{arrowheadchild}(4))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
224 %! assert (childydata{stemchild}(1), 1, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
225 %! assert (childydata{stemchild}(2), 1 + 1*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
226 %! assert (isnan (childydata{stemchild}(3))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
227 %! assert (childydata{arrowheadchild}(2), 1 + 1*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
228 %! assert (isnan (childydata{arrowheadchild}(4))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
229 %! assert (childzdata{stemchild}(1), 1, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
230 %! assert (childzdata{stemchild}(2), 1 + 1*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
231 %! assert (isnan (childzdata{stemchild}(3))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
232 %! assert (childzdata{arrowheadchild}(2), 1 + 1*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
233 %! assert (isnan (childzdata{arrowheadchild}(4))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
234 %! ## Check last arrow. |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
235 %! assert (childxdata{stemchild}(numpts*3-2), 3, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
236 %! assert (childxdata{stemchild}(numpts*3-1), 3 + 12*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
237 %! assert (isnan (childxdata{stemchild}(end))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
238 %! assert (childxdata{arrowheadchild}(numpts*4-2), 3 + 12*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
239 %! assert (isnan (childxdata{arrowheadchild}(end))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
240 %! assert (childydata{stemchild}(numpts*3-2), 2, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
241 %! assert (childydata{stemchild}(numpts*3-1), 2 + 12*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
242 %! assert (isnan (childydata{stemchild}(end))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
243 %! assert (childydata{arrowheadchild}(numpts*4-2), 2 + 12*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
244 %! assert (isnan (childydata{arrowheadchild}(end))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
245 %! assert (childzdata{stemchild}(numpts*3-2), 12, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
246 %! assert (childzdata{stemchild}(numpts*3-1), 12 + 12*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
247 %! assert (isnan (childzdata{stemchild}(end))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
248 %! assert (childzdata{arrowheadchild}(numpts*4-2), 12 + 12*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
249 %! assert (isnan (childzdata{arrowheadchild}(end))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
250 %! |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
251 %! h = quiver3 (hax, xx, yy, a, a, a, a, 1); # x,y input as matrices. |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
252 %! children = get (h, "children"); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
253 %! childxdata = get (children, "xdata"); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
254 %! childydata = get (children, "ydata"); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
255 %! childzdata = get (children, "zdata"); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
256 %! basechild = find (cellfun (@numel, childxdata) == numpts); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
257 %! stemchild = find (cellfun (@numel, childxdata) == numpts*3); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
258 %! arrowheadchild = find (cellfun (@numel, childxdata) == numpts*4); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
259 %! ## Check all bases. |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
260 %! assert (childxdata{basechild}, [1, 1, 2, 2, 3, 3, 1, 1, 2, 2, 3, 3]); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
261 %! assert (childydata{basechild}, [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
262 %! assert (childzdata{basechild}, [1:12]); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
263 %! ## Check first arrow. |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
264 %! assert (childxdata{stemchild}(1), 1, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
265 %! assert (childxdata{stemchild}(2), 1 + 1*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
266 %! assert (isnan (childxdata{stemchild}(3))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
267 %! assert (childxdata{arrowheadchild}(2), 1 + 1*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
268 %! assert (isnan (childxdata{arrowheadchild}(4))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
269 %! assert (childydata{stemchild}(1), 1, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
270 %! assert (childydata{stemchild}(2), 1 + 1*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
271 %! assert (isnan (childydata{stemchild}(3))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
272 %! assert (childydata{arrowheadchild}(2), 1 + 1*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
273 %! assert (isnan (childydata{arrowheadchild}(4))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
274 %! assert (childzdata{stemchild}(1), 1, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
275 %! assert (childzdata{stemchild}(2), 1 + 1*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
276 %! assert (isnan (childzdata{stemchild}(3))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
277 %! assert (childzdata{arrowheadchild}(2), 1 + 1*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
278 %! assert (isnan (childzdata{arrowheadchild}(4))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
279 %! ## Check last arrow. |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
280 %! assert (childxdata{stemchild}(numpts*3-2), 3, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
281 %! assert (childxdata{stemchild}(numpts*3-1), 3 + 12*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
282 %! assert (isnan (childxdata{stemchild}(end))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
283 %! assert (childxdata{arrowheadchild}(numpts*4-2), 3 + 12*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
284 %! assert (isnan (childxdata{arrowheadchild}(end))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
285 %! assert (childydata{stemchild}(numpts*3-2), 2, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
286 %! assert (childydata{stemchild}(numpts*3-1), 2 + 12*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
287 %! assert (isnan (childydata{stemchild}(end))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
288 %! assert (childydata{arrowheadchild}(numpts*4-2), 2 + 12*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
289 %! assert (isnan (childydata{arrowheadchild}(end))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
290 %! assert (childzdata{stemchild}(numpts*3-2), 12, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
291 %! assert (childzdata{stemchild}(numpts*3-1), 12 + 12*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
292 %! assert (isnan (childzdata{stemchild}(end))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
293 %! assert (childzdata{arrowheadchild}(numpts*4-2), 12 + 12*sf, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
294 %! assert (isnan (childzdata{arrowheadchild}(end))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
295 %! |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
296 %! h = quiver3 (hax, x, y, z, a, a, a, 1); # x,y z input as vectors. |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
297 %! children = get (h, "children"); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
298 %! childxdata = get (children, "xdata"); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
299 %! childydata = get (children, "ydata"); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
300 %! childzdata = get (children, "zdata"); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
301 %! basechild = find (cellfun (@numel, childxdata) == numpts); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
302 %! stemchild = find (cellfun (@numel, childxdata) == numpts*3); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
303 %! arrowheadchild = find (cellfun (@numel, childxdata) == numpts*4); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
304 %! ## Check all bases. |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
305 %! assert (childxdata{basechild}, [1, 1, 2, 2, 3, 3, 1, 1, 2, 2, 3, 3]); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
306 %! assert (childydata{basechild}, [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
307 %! assert (childzdata{basechild}, [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2]); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
308 %! ## Check first arrow. |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
309 %! assert (childxdata{stemchild}(1), 1, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
310 %! assert (childxdata{stemchild}(2), 1 + 1*sf2, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
311 %! assert (isnan (childxdata{stemchild}(3))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
312 %! assert (childxdata{arrowheadchild}(2), 1 + 1*sf2, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
313 %! assert (isnan (childxdata{arrowheadchild}(4))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
314 %! assert (childydata{stemchild}(1), 1, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
315 %! assert (childydata{stemchild}(2), 1 + 1*sf2, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
316 %! assert (isnan (childydata{stemchild}(3))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
317 %! assert (childydata{arrowheadchild}(2), 1 + 1*sf2, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
318 %! assert (isnan (childydata{arrowheadchild}(4))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
319 %! assert (childzdata{stemchild}(1), 1, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
320 %! assert (childzdata{stemchild}(2), 1 + 1*sf2, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
321 %! assert (isnan (childzdata{stemchild}(3))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
322 %! assert (childzdata{arrowheadchild}(2), 1 + 1*sf2, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
323 %! assert (isnan (childzdata{arrowheadchild}(4))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
324 %! ## Check last arrow. |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
325 %! assert (childxdata{stemchild}(numpts*3-2), 3, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
326 %! assert (childxdata{stemchild}(numpts*3-1), 3 + 12*sf2, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
327 %! assert (isnan (childxdata{stemchild}(end))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
328 %! assert (childxdata{arrowheadchild}(numpts*4-2), 3 + 12*sf2, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
329 %! assert (isnan (childxdata{arrowheadchild}(end))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
330 %! assert (childydata{stemchild}(numpts*3-2), 2, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
331 %! assert (childydata{stemchild}(numpts*3-1), 2 + 12*sf2, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
332 %! assert (isnan (childydata{stemchild}(end))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
333 %! assert (childydata{arrowheadchild}(numpts*4-2), 2 + 12*sf2, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
334 %! assert (isnan (childydata{arrowheadchild}(end))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
335 %! assert (childzdata{stemchild}(numpts*3-2), 2, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
336 %! assert (childzdata{stemchild}(numpts*3-1), 2 + 12*sf2, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
337 %! assert (isnan (childzdata{stemchild}(end))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
338 %! assert (childzdata{arrowheadchild}(numpts*4-2), 2 + 12*sf2, eps); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
339 %! assert (isnan (childzdata{arrowheadchild}(end))); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
340 %! unwind_protect_cleanup |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
341 %! close (hf); |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
342 %! end_unwind_protect |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
343 |
32062
ada96a467a28
quiver: Improve plotting with non-float numeric inputs (bug #59695)
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
31706
diff
changeset
|
344 ##Test input validation |
ada96a467a28
quiver: Improve plotting with non-float numeric inputs (bug #59695)
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
31706
diff
changeset
|
345 %!error <Invalid call> quiver3 () |
ada96a467a28
quiver: Improve plotting with non-float numeric inputs (bug #59695)
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
31706
diff
changeset
|
346 %!error <Invalid call> quiver3 (1.1) |
ada96a467a28
quiver: Improve plotting with non-float numeric inputs (bug #59695)
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
31706
diff
changeset
|
347 %!error <Invalid call> quiver3 (1.1, 2) |
ada96a467a28
quiver: Improve plotting with non-float numeric inputs (bug #59695)
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
31706
diff
changeset
|
348 %!error <Invalid call> quiver3 (1.1, 2, 3) |
32074
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
349 %!error <Invalid call> quiver3 (1.1, 2, 3, "foo") |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
350 %!error <Invalid call> quiver3 (1.1, 2, 3, 4, 5, 6, 7, 8, "foo") |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
351 %!error <U, V, and W must be the same> quiver3 (30, [40 50], 60, 70) |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
352 %!error <Z vector length must equal size of> quiver3 ([30 40], eye(3), eye(3), eye(3)) |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
353 %!error <Z, U, V, and W must be the same> quiver3 ([30 40], 50, 60, 70) |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
354 %!error <Z, U, V, and W must be the same> quiver3 (eye(2), eye(3), eye(2), eye(2)) |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
355 %!error <Z, U, V, and W must be the same> quiver3 (eye(2), eye(2), eye(3), eye(2)) |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
356 %!error <Z, U, V, and W must be the same> quiver3 (eye(2), eye(2), eye(2), eye(3)) |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
357 %!error <U, V, and W must be the same size> quiver3 ([1:2], [1:2], 1, eye(3), eye(2), eye(2)) |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
358 %!error <U, V, and W must be the same size> quiver3 ([1:2], [1:2], 1, eye(2), eye(3), eye(2)) |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
359 %!error <U, V, and W must be the same size> quiver3 ([1:2], [1:2], 1, eye(2), eye(2), eye(3)) |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
360 %!error <X vector length must equal number of> quiver3 ([1:3], [1:2], 1, eye(2), eye(2), eye(2)) |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
361 %!error <Y vector length must equal number of> quiver3 ([1:2], [1:3], 1, eye(2), eye(2), eye(2)) |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
362 %!error <Z vector length must equal size of> quiver3 ([1:2], [1:2], [1:2], eye(2), eye(2), eye(2)) |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
363 %!error <X, Y, Z, U, V, and W must be the same size> quiver3 (eye(3), eye(2), eye(2), eye(2), eye(2), eye(2)) |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
364 %!error <X, Y, Z, U, V, and W must be the same size> quiver3 (eye(2), eye(3), eye(2), eye(2), eye(2), eye(2)) |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
365 %!error <X, Y, Z, U, V, and W must be the same size> quiver3 (eye(2), eye(2), eye(3), eye(2), eye(2), eye(2)) |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
366 %!error <X, Y, Z, U, V, and W must be the same size> quiver3 (eye(2), eye(2), eye(2), eye(3), eye(2), eye(2)) |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
367 %!error <X, Y, Z, U, V, and W must be the same size> quiver3 (eye(2), eye(2), eye(2), eye(2), eye(3), eye(2)) |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
368 %!error <X, Y, Z, U, V, and W must be the same size> quiver3 (eye(2), eye(2), eye(2), eye(2), eye(2), eye(3)) |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
369 %!error <scaling factor must be> quiver3 (10, 20, 30, 40, -5) |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
370 %!error <scaling factor must be> quiver3 (10, 20, 30, 40, [1 2]) |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
371 %!error <scaling factor must be> quiver3 (10, 20, 30, 40, 50, 60, -5) |
03fe0b635d2e
quiver/quiver3: Overhaul input processing, validation, and add BISTs.
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents:
32062
diff
changeset
|
372 %!error <scaling factor must be> quiver3 (10, 20, 30, 40, 50, 60, [1 2]) |