Mercurial > hg > octave-nkf
comparison scripts/image/imshow.m @ 18614:8e384416ebb3 stable
imshow.m: Fix bad input validation of ydata (bug #41773).
* imshow.m: Check that ydata is a vector and issue an error if it isn't.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 04 Mar 2014 19:56:09 -0800 |
parents | 887df64e54e4 |
children | d57a83f2d73e 446c46af4b42 |
comparison
equal
deleted
inserted
replaced
18613:17baa684892c | 18614:8e384416ebb3 |
---|---|
128 error ("imshow: xdata must be a vector") | 128 error ("imshow: xdata must be a vector") |
129 endif | 129 endif |
130 xdata = [xdata(1) xdata(end)]; | 130 xdata = [xdata(1) xdata(end)]; |
131 case "ydata"; | 131 case "ydata"; |
132 ydata = varargin{narg++}; | 132 ydata = varargin{narg++}; |
133 if (isvector (xdata)) | 133 if (! isvector (ydata)) |
134 error ("imshow: expect a vector for ydata") | 134 error ("imshow: expect a vector for ydata") |
135 endif | 135 endif |
136 ydata = [ydata(1) ydata(end)]; | 136 ydata = [ydata(1) ydata(end)]; |
137 case {"truesize", "initialmagnification"} | 137 case {"truesize", "initialmagnification"} |
138 warning ("image: zoom argument ignored -- use GUI features"); | 138 warning ("image: zoom argument ignored -- use GUI features"); |