Mercurial > hg > octave-jordi
changeset 17302:6ba5b1dadd61
plotmatrix.m: Replace ifelse() construction with if/endif.
* scripts/plot/plotmatrix.m: Replace ifelse() construction with if/endif.
Move argument return out of unwind_protect to end of function.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 20 Aug 2013 22:35:08 -0700 |
parents | 68bcac3c043a |
children | 8520c264619c |
files | scripts/plot/plotmatrix.m |
diffstat | 1 files changed, 12 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/plotmatrix.m +++ b/scripts/plot/plotmatrix.m @@ -72,19 +72,15 @@ print_usage (); endif - oldfig = ifelse (isempty (bigax2), [], get (0, "currentfigure")); + oldfig = []; + if (! isempty (bigax2)) + oldfig = get (0, "currentfigure"); + endif unwind_protect bigax2 = newplot (bigax2); [h2, ax2, p2, pax2] = __plotmatrix__ (bigax2, varargin{:}); - if (nargout > 0) - h = h2; - ax = ax2; - bigax = bigax2; - p = p2; - pax = pax2; - endif axes (bigax2); ctext = text (0, 0, "", "visible", "off", "handlevisibility", "off", "xliminclude", "off", @@ -98,6 +94,14 @@ endif end_unwind_protect + if (nargout > 0) + h = h2; + ax = ax2; + bigax = bigax2; + p = p2; + pax = pax2; + endif + endfunction