comparison scripts/plot/draw/private/__stem__.m @ 19734:00e31f316a3a

Fix Matlab incompatibility of "ismatrix" (bug #42422). * data.cc (isvector): new tests * data.cc (isrow): documentation improved, new tests * data.cc (iscolumn): documentation improved, new tests * data.cc (ismatrix): is matrix now only checks the dimension due to Matlab compatibility, documentation improved, new tests * accumarray.m: use more appropriate function, than ismatrix * gradient.m: use more appropriate function, than ismatrix * num2str.m: use more appropriate functions, than ismatrix * ntsc2rgb.m: use more appropriate function, than ismatrix * condest.m: use more appropriate function, than ismatrix * expm.m: use more appropriate function, than ismatrix * onenormest.m: use more appropriate function, than ismatrix * isocolors.m: use more appropriate function, than ismatrix * isonormals.m: use more appropriate function, than ismatrix * isosurface.m: use more appropriate function, than ismatrix * __errcomm__.m: use more appropriate function, than ismatrix * __interp_cube__.m: use more appropriate function, than ismatrix * __marching_cube__.m: use more appropriate function, than ismatrix * __stem__.m: use more appropriate function, than ismatrix * stairs.m: use more appropriate function, than ismatrix * validsetargs.m: use more appropriate functions, than ismatrix * unique.m: use more appropriate functions, than ismatrix * bicg.m: additional tests for numerical value * bicgstab.m: additional tests for numerical value * cgs.m: additional tests for numerical value * gmres.m: additional tests for numerical value * qmr.m: additional tests for numerical value
author Kai T. Ohlhus <k.ohlhus@gmail.com>
date Thu, 12 Feb 2015 18:34:56 +0100
parents 4197fc428c7d
children 9fc020886ae9
comparison
equal deleted inserted replaced
19733:2e9f17872f36 19734:00e31f316a3a
237 else 237 else
238 x = repmat ([1:nc], nr, 1); 238 x = repmat ([1:nc], nr, 1);
239 y = repmat ([1:nr]', 1, nc); 239 y = repmat ([1:nr]', 1, nc);
240 endif 240 endif
241 endif 241 endif
242 if (! (ismatrix (x) && ismatrix (y) && ismatrix (z))) 242 if (! (isnumeric (x) && isnumeric (y) && isnumeric (z)))
243 error ("stem3: X, Y, and Z must be numeric"); 243 error ("stem3: X, Y, and Z must be numeric");
244 endif 244 endif
245 else 245 else
246 if (isempty (x)) 246 if (isempty (x))
247 if (isvector (y)) 247 if (isvector (y))
248 x = 1:length (y); 248 x = 1:length (y);
249 elseif (ismatrix (y)) 249 elseif (ismatrix (y))
250 x = 1:rows (y); 250 x = 1:rows (y);
251 endif 251 endif
252 endif 252 endif
253 if (! (ismatrix (x) && ismatrix (y))) 253 if (! (isnumeric (x) && isnumeric (y)))
254 error ("stem: X and Y must be numeric"); 254 error ("stem: X and Y must be numeric");
255 endif 255 endif
256 endif 256 endif
257 257
258 ## Check sizes of x, y and z. 258 ## Check sizes of x, y and z.