Mercurial > octave-nkf
comparison scripts/control/base/__stepimp__.m @ 11658:db22340e1f24 release-3-0-x
__stepimp__: don't call subplot for single plot
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 22 Feb 2008 04:02:37 -0500 |
parents | 4a375de63f66 |
children | df9519e9990c 72830070a17b |
comparison
equal
deleted
inserted
replaced
11657:6c413446e087 | 11658:db22340e1f24 |
---|---|
235 tt = "step"; | 235 tt = "step"; |
236 endif | 236 endif |
237 ncols = floor (sqrt (NOUT)); | 237 ncols = floor (sqrt (NOUT)); |
238 nrows = ceil (NOUT / ncols); | 238 nrows = ceil (NOUT / ncols); |
239 for i = 1:NOUT | 239 for i = 1:NOUT |
240 subplot (nrows, ncols, i); | 240 if (nrows > 1 || ncols > 1) |
241 subplot (nrows, ncols, i); | |
242 endif | |
241 if (DIGITAL) | 243 if (DIGITAL) |
242 [ts, ys] = stairs (t, y(i,:)); | 244 [ts, ys] = stairs (t, y(i,:)); |
243 ts = ts(1:2*n-2)'; | 245 ts = ts(1:2*n-2)'; |
244 ys = ys(1:2*n-2)'; | 246 ys = ys(1:2*n-2)'; |
245 if (length (gm) > 0) | 247 if (length (gm) > 0) |