comparison scripts/image/iscolormap.m @ 19899:e9f89866074c

maint: Cleanup some .m files to follow Octave coding conventions. * accumarray.m, validateattributes.m, iscolormap.m, __imread__.m, __imwrite__.m, imwrite_filename.m, strread.m, getappdata.m, appearance/annotation.m, shrinkfaces.m, rundemos.m, runtests.m, datenum.m, datestr.m: Break long lines before && and ||.
author John W. Eaton <jwe@octave.org>
date Thu, 26 Feb 2015 13:13:40 -0500
parents 4197fc428c7d
children 7503499a252b
comparison
equal deleted inserted replaced
19898:17d647821d61 19899:e9f89866074c
33 33
34 if (nargin != 1) 34 if (nargin != 1)
35 print_usage; 35 print_usage;
36 endif 36 endif
37 37
38 retval = (isnumeric (cmap) && isreal (cmap) && 38 retval = (isnumeric (cmap) && isreal (cmap) && ndims (cmap) == 2
39 ndims (cmap) == 2 && columns (cmap) == 3 && isa (cmap, "double") && 39 && columns (cmap) == 3 && isa (cmap, "double")
40 min (cmap(:)) >= 0 && max (cmap(:)) <= 1); 40 && min (cmap(:)) >= 0 && max (cmap(:)) <= 1);
41 41
42 endfunction 42 endfunction
43 43
44 44
45 %!assert (iscolormap (jet (64))) 45 %!assert (iscolormap (jet (64)))