Mercurial > octave-nkf
diff scripts/image/cmunique.m @ 15515:4beb3a4bd440
rgbplot.m, cmpermute.m, cmunique.m, ind2rgb.m, imwrite.m: use core iscolormap function
author | Carnë Draug <carandraug+dev@gmail.com> |
---|---|
date | Fri, 12 Oct 2012 23:11:08 +0200 |
parents | bc61fba0e9fd |
children | b1cd65881592 |
line wrap: on
line diff
--- a/scripts/image/cmunique.m Fri Oct 12 23:08:55 2012 +0200 +++ b/scripts/image/cmunique.m Fri Oct 12 23:11:08 2012 +0200 @@ -68,9 +68,7 @@ if (nargin == 2) ## (X, map) case - if (! isnumeric (map) || iscomplex (map) - || ndims (map) != 2 || columns (map) != 3 - || any (map(:) < 0) || any (map(:) > 1)) + if (! iscolormap (map)) error ("cmunique: MAP must be a valid colormap"); endif [newmap,i,j] = unique (map, "rows"); # calculate unique colormap