Mercurial > octave-nkf
annotate scripts/general/bitset.m @ 20193:7503499a252b stable
doc: Update docstrings to have one sentence summary as first line.
Update scripts in audio, elfun, general, geometry, and image directories.
* scripts/audio/@audioplayer/__get_properties__.m,
scripts/audio/@audioplayer/audioplayer.m, scripts/audio/@audioplayer/get.m,
scripts/audio/@audioplayer/isplaying.m, scripts/audio/@audioplayer/play.m,
scripts/audio/@audioplayer/playblocking.m, scripts/audio/@audioplayer/set.m,
scripts/audio/@audioplayer/subsasgn.m, scripts/audio/@audioplayer/subsref.m,
scripts/audio/@audiorecorder/audiorecorder.m,
scripts/audio/@audiorecorder/get.m,
scripts/audio/@audiorecorder/getaudiodata.m,
scripts/audio/@audiorecorder/getplayer.m,
scripts/audio/@audiorecorder/isrecording.m,
scripts/audio/@audiorecorder/play.m, scripts/audio/@audiorecorder/record.m,
scripts/audio/@audiorecorder/recordblocking.m,
scripts/audio/@audiorecorder/set.m, scripts/audio/@audiorecorder/stop.m,
scripts/audio/@audiorecorder/subsasgn.m,
scripts/audio/@audiorecorder/subsref.m, scripts/audio/lin2mu.m,
scripts/audio/mu2lin.m, scripts/audio/record.m, scripts/audio/sound.m,
scripts/audio/soundsc.m, scripts/audio/wavread.m, scripts/audio/wavwrite.m,
scripts/elfun/cosd.m, scripts/elfun/sind.m, scripts/elfun/tand.m,
scripts/general/accumarray.m, scripts/general/accumdim.m,
scripts/general/bitcmp.m, scripts/general/bitget.m, scripts/general/bitset.m,
scripts/general/blkdiag.m, scripts/general/cart2pol.m,
scripts/general/cart2sph.m, scripts/general/cell2mat.m,
scripts/general/celldisp.m, scripts/general/chop.m,
scripts/general/circshift.m, scripts/general/common_size.m,
scripts/general/cplxpair.m, scripts/general/cumtrapz.m,
scripts/general/dblquad.m, scripts/general/deal.m, scripts/general/del2.m,
scripts/general/display.m, scripts/general/divergence.m,
scripts/general/fieldnames.m, scripts/general/flip.m,
scripts/general/flipdim.m, scripts/general/fliplr.m, scripts/general/flipud.m,
scripts/general/gradient.m, scripts/general/interp3.m,
scripts/general/interpft.m, scripts/general/interpn.m,
scripts/general/loadobj.m, scripts/general/logspace.m,
scripts/general/methods.m, scripts/general/nargchk.m,
scripts/general/narginchk.m, scripts/general/nargoutchk.m,
scripts/general/nextpow2.m, scripts/general/nthargout.m,
scripts/general/num2str.m, scripts/general/pol2cart.m,
scripts/general/polyarea.m, scripts/general/postpad.m,
scripts/general/prepad.m, scripts/general/profile.m, scripts/general/quadgk.m,
scripts/general/quadl.m, scripts/general/quadv.m, scripts/general/randi.m,
scripts/general/rat.m, scripts/general/repmat.m, scripts/general/rot90.m,
scripts/general/rotdim.m, scripts/general/saveobj.m, scripts/general/shift.m,
scripts/general/shiftdim.m, scripts/general/sortrows.m,
scripts/general/sph2cart.m, scripts/general/structfun.m,
scripts/general/subsindex.m, scripts/general/trapz.m,
scripts/general/triplequad.m, scripts/geometry/delaunayn.m,
scripts/geometry/dsearch.m, scripts/geometry/dsearchn.m,
scripts/geometry/griddata.m, scripts/geometry/griddata3.m,
scripts/geometry/griddatan.m, scripts/geometry/inpolygon.m,
scripts/geometry/rectint.m, scripts/geometry/tsearchn.m,
scripts/geometry/voronoi.m, scripts/geometry/voronoin.m,
scripts/help/__unimplemented__.m, scripts/help/doc.m,
scripts/help/doc_cache_create.m, scripts/help/get_first_help_sentence.m,
scripts/help/help.m, scripts/help/lookfor.m, scripts/help/print_usage.m,
scripts/help/type.m, scripts/help/which.m, scripts/image/autumn.m,
scripts/image/bone.m, scripts/image/brighten.m, scripts/image/cmpermute.m,
scripts/image/colorcube.m, scripts/image/contrast.m, scripts/image/cool.m,
scripts/image/copper.m, scripts/image/cubehelix.m, scripts/image/flag.m,
scripts/image/gmap40.m, scripts/image/gray.m, scripts/image/gray2ind.m,
scripts/image/hot.m, scripts/image/hsv.m, scripts/image/image.m,
scripts/image/imagesc.m, scripts/image/imfinfo.m, scripts/image/imformats.m,
scripts/image/imread.m, scripts/image/imshow.m, scripts/image/imwrite.m,
scripts/image/iscolormap.m, scripts/image/jet.m, scripts/image/lines.m,
scripts/image/ntsc2rgb.m, scripts/image/ocean.m, scripts/image/pink.m,
scripts/image/prism.m, scripts/image/rainbow.m, scripts/image/rgb2ntsc.m,
scripts/image/spinmap.m, scripts/image/spring.m, scripts/image/summer.m,
scripts/image/white.m, scripts/image/winter.m:
Update docstrings to have one sentence summary as first line.
Re-structure to have line lengths <= 80 chars.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 03 May 2015 09:36:20 -0700 |
parents | 4197fc428c7d |
children | 4bb41929286b |
rev | line source |
---|---|
19731
4197fc428c7d
maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
1 ## Copyright (C) 2004-2015 David Bateman |
14633
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
2 ## Copyright (C) 2012 Jordi GutiƩrrez Hermoso |
4916 | 3 ## |
7016 | 4 ## This file is part of Octave. |
4916 | 5 ## |
7016 | 6 ## Octave is free software; you can redistribute it and/or modify it |
7 ## under the terms of the GNU General Public License as published by | |
8 ## the Free Software Foundation; either version 3 of the License, or (at | |
9 ## your option) any later version. | |
10 ## | |
11 ## Octave is distributed in the hope that it will be useful, but | |
12 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 ## General Public License for more details. | |
4916 | 15 ## |
16 ## You should have received a copy of the GNU General Public License | |
7016 | 17 ## along with Octave; see the file COPYING. If not, see |
18 ## <http://www.gnu.org/licenses/>. | |
4916 | 19 |
20 ## -*- texinfo -*- | |
11469
c776f063fefe
Overhaul m-script files to use common variable name between code and documentation.
Rik <octave@nomad.inbox5.com>
parents:
10793
diff
changeset
|
21 ## @deftypefn {Function File} {@var{C} =} bitset (@var{A}, @var{n}) |
c776f063fefe
Overhaul m-script files to use common variable name between code and documentation.
Rik <octave@nomad.inbox5.com>
parents:
10793
diff
changeset
|
22 ## @deftypefnx {Function File} {@var{C} =} bitset (@var{A}, @var{n}, @var{val}) |
20193
7503499a252b
doc: Update docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19731
diff
changeset
|
23 ## Set or reset bit(s) @var{n} of the unsigned integers in @var{A}. |
7503499a252b
doc: Update docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19731
diff
changeset
|
24 ## |
11469
c776f063fefe
Overhaul m-script files to use common variable name between code and documentation.
Rik <octave@nomad.inbox5.com>
parents:
10793
diff
changeset
|
25 ## @var{val} = 0 resets and @var{val} = 1 sets the bits. |
20193
7503499a252b
doc: Update docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19731
diff
changeset
|
26 ## The least significant bit is @var{n} = 1. All variables must be the same |
7503499a252b
doc: Update docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19731
diff
changeset
|
27 ## size or scalars. |
4916 | 28 ## |
29 ## @example | |
9051
1bf0ce0930be
Grammar check TexInfo in all .m files
Rik <rdrider0-list@yahoo.com>
parents:
7017
diff
changeset
|
30 ## @group |
4920 | 31 ## dec2bin (bitset (10, 1)) |
14327
4d917a6a858b
doc: Use Octave coding conventions in @example blocks of docstrings.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
32 ## @result{} 1011 |
9051
1bf0ce0930be
Grammar check TexInfo in all .m files
Rik <rdrider0-list@yahoo.com>
parents:
7017
diff
changeset
|
33 ## @end group |
4916 | 34 ## @end example |
5642 | 35 ## @seealso{bitand, bitor, bitxor, bitget, bitcmp, bitshift, bitmax} |
5053 | 36 ## @end deftypefn |
4916 | 37 |
14643
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
38 function C = bitset (A, n, val) |
4920 | 39 |
4916 | 40 if (nargin < 2 || nargin > 3) |
6046 | 41 print_usage (); |
4916 | 42 endif |
43 | |
14643
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
44 if (any (A(:) < 0)) |
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
45 error ("bitset: A must be >= 0"); |
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
46 endif |
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
47 |
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
48 sz = size (A); |
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
49 |
4916 | 50 if (nargin == 2) |
14643
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
51 val = true (sz); |
4916 | 52 endif |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
53 |
14633
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
54 cl = class (A); |
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
55 |
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
56 if (isfloat (A) && isreal (A)) |
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
57 Bmax = bitmax (cl); |
17391
7d8d194f3f63
bitget.m, bitset.m: Make max bit index consistent
Mike Miller <mtmiller@ieee.org>
parents:
14643
diff
changeset
|
58 Amax = ceil (log2 (Bmax)); |
14633
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
59 elseif (isinteger (A)) |
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
60 Bmax = intmax (cl); |
17391
7d8d194f3f63
bitget.m, bitset.m: Make max bit index consistent
Mike Miller <mtmiller@ieee.org>
parents:
14643
diff
changeset
|
61 Amax = ceil (log2 (Bmax)); |
4916 | 62 else |
14633
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
63 error ("bitset: invalid class %s", cl); |
4916 | 64 endif |
65 | |
14633
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
66 if (any ((n < 1)(:)) || any ((n > Amax)(:))) |
12480
139f993936af
Uppercase variables in script error strings.
Rik <octave@nomad.inbox5.com>
parents:
11587
diff
changeset
|
67 error ("bitset: N must be in the range [1,%d]", Amax); |
4916 | 68 endif |
69 | |
14633
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
70 mask = bitshift (cast (1, cl), uint8 (n) - uint8 (1)); |
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
71 |
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
72 on = logical (val); |
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
73 off = !on; |
4916 | 74 |
14633
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
75 if (isscalar (mask)) |
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
76 onmask = mask; |
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
77 offmask = mask; |
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
78 else |
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
79 if (! size_equal (A, n)) |
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
80 error ("bitset: N must be scalar or the same size as A"); |
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
81 endif |
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
82 onmask = mask(on); |
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
83 offmask = mask(off); |
4916 | 84 endif |
85 | |
14643
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
86 C = zeros (sz, cl); |
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
87 C(on) = bitor (A(on), onmask); |
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
88 C(off) = bitand (A(off), bitcmp (offmask)); |
14633
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
89 |
4916 | 90 endfunction |
12795
9e7ebbaf69ff
codesprint: new tests for files in scripts/general directory
John W. Eaton <jwe@octave.org>
parents:
12480
diff
changeset
|
91 |
9e7ebbaf69ff
codesprint: new tests for files in scripts/general directory
John W. Eaton <jwe@octave.org>
parents:
12480
diff
changeset
|
92 |
9e7ebbaf69ff
codesprint: new tests for files in scripts/general directory
John W. Eaton <jwe@octave.org>
parents:
12480
diff
changeset
|
93 %!test |
9e7ebbaf69ff
codesprint: new tests for files in scripts/general directory
John W. Eaton <jwe@octave.org>
parents:
12480
diff
changeset
|
94 %! assert (bitset ([0, 10], [3, 3]), [4, 14]); |
17392
e09cd91168d1
Support arguments of class single in bit manipulation functions (bug #34502)
Mike Miller <mtmiller@ieee.org>
parents:
17391
diff
changeset
|
95 %! assert (bitset (single ([0, 10]), [3, 3]), single ([4, 14])); |
12795
9e7ebbaf69ff
codesprint: new tests for files in scripts/general directory
John W. Eaton <jwe@octave.org>
parents:
12480
diff
changeset
|
96 %! pfx = {"", "u"}; |
9e7ebbaf69ff
codesprint: new tests for files in scripts/general directory
John W. Eaton <jwe@octave.org>
parents:
12480
diff
changeset
|
97 %! for i = 1:2 |
9e7ebbaf69ff
codesprint: new tests for files in scripts/general directory
John W. Eaton <jwe@octave.org>
parents:
12480
diff
changeset
|
98 %! for prec = [8, 16, 32, 64] |
9e7ebbaf69ff
codesprint: new tests for files in scripts/general directory
John W. Eaton <jwe@octave.org>
parents:
12480
diff
changeset
|
99 %! fcn = str2func (sprintf ("%sint%d", pfx{i}, prec)); |
9e7ebbaf69ff
codesprint: new tests for files in scripts/general directory
John W. Eaton <jwe@octave.org>
parents:
12480
diff
changeset
|
100 %! assert (bitset (fcn ([0, 10]), [3, 3]), fcn ([4, 14])); |
9e7ebbaf69ff
codesprint: new tests for files in scripts/general directory
John W. Eaton <jwe@octave.org>
parents:
12480
diff
changeset
|
101 %! endfor |
9e7ebbaf69ff
codesprint: new tests for files in scripts/general directory
John W. Eaton <jwe@octave.org>
parents:
12480
diff
changeset
|
102 %! endfor |
9e7ebbaf69ff
codesprint: new tests for files in scripts/general directory
John W. Eaton <jwe@octave.org>
parents:
12480
diff
changeset
|
103 |
14633
056ea51070b8
Rewrite bitset.m (bug #36458)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14363
diff
changeset
|
104 ## Bug #36458 |
14643
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
105 %!assert (bitset (uint8 ([1, 2;3 4]), 1, [0 1; 0 1]), uint8 ([0, 3; 2 5])) |
12795
9e7ebbaf69ff
codesprint: new tests for files in scripts/general directory
John W. Eaton <jwe@octave.org>
parents:
12480
diff
changeset
|
106 |
14363
f3d52523cde1
Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents:
14327
diff
changeset
|
107 %!error bitset (1) |
f3d52523cde1
Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents:
14327
diff
changeset
|
108 %!error bitset (1, 2, 3, 4) |
14643
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
109 %!error <A must be .= 0> bitset (-1, 2) |
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
110 %!error <invalid class char> bitset ("1", 2) |
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
111 %!error <N must be in the range \[1,53\]> bitset (0, 0) |
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
112 %!error <N must be in the range \[1,53\]> bitset (0, 55) |
17392
e09cd91168d1
Support arguments of class single in bit manipulation functions (bug #34502)
Mike Miller <mtmiller@ieee.org>
parents:
17391
diff
changeset
|
113 %!error <N must be in the range \[1,24\]> bitset (single (0), 0) |
e09cd91168d1
Support arguments of class single in bit manipulation functions (bug #34502)
Mike Miller <mtmiller@ieee.org>
parents:
17391
diff
changeset
|
114 %!error <N must be in the range \[1,24\]> bitset (single (0), 26) |
14643
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
115 %!error <N must be in the range \[1,8\]> bitset (uint8 (0), 0) |
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
116 %!error <N must be in the range \[1,8\]> bitset (uint8 (0), 9) |
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
117 %!error <N must be in the range \[1,7\]> bitset (int8 (0), 9) |
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
118 %!error <N must be in the range \[1,15\]> bitset (int16 (0), 17) |
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
119 %!error <N must be in the range \[1,16\]> bitset (uint16 (0), 17) |
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
120 %!error <N must be in the range \[1,31\]> bitset (int32 (0), 33) |
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
121 %!error <N must be in the range \[1,32\]> bitset (uint32 (0), 33) |
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
122 %!error <N must be in the range \[1,63\]> bitset (int64 (0), 65) |
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
123 %!error <N must be in the range \[1,64\]> bitset (uint64 (0), 65) |
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
124 %!error <N must be scalar or the same size as A> bitset (uint8 (1), [1 3]) |
d4b4080faa47
bitset.m: Update function to check for negative inputs.
Rik <octave@nomad.inbox5.com>
parents:
14639
diff
changeset
|
125 %!error <N must be scalar or the same size as A> bitset (uint8 (1:3), [1 3]) |
12795
9e7ebbaf69ff
codesprint: new tests for files in scripts/general directory
John W. Eaton <jwe@octave.org>
parents:
12480
diff
changeset
|
126 |