[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Changeset]: Re: cla() ?
From: |
John W. Eaton |
Subject: |
Re: [Changeset]: Re: cla() ? |
Date: |
Mon, 06 Oct 2008 14:02:55 -0400 |
On 6-Oct-2008, Ben Abbott wrote:
| Everything compiled and make check had no problem.
|
| Given that I don't see any failures, does it make sense to also apply
| a changeset such as the one I've attached?
|
| As my c++ skill is wanting, please review this proposal before
| committing.
I don't see any C++ in this patch.
| diff --git a/scripts/plot/__plt_get_axis_arg__.m
b/scripts/plot/__plt_get_axis_arg__.m
| --- a/scripts/plot/__plt_get_axis_arg__.m
| +++ b/scripts/plot/__plt_get_axis_arg__.m
| @@ -32,8 +32,8 @@
|
| ## Figure handles are integers, but object handles are non integer,
| ## therefore ignore integer scalars.
| - if (nargin > 1 && length (varargin) > 0 && ishandle (varargin{1})
| - && floor(varargin{1}) != varargin{1})
| + if (nargin > 1 && length (varargin) > 0 && numel(varargin{1}) == 1 &&
ishandle (varargin{1}(1))
| + && floor(varargin{1}(1)) != varargin{1}(1))
I think a test like
floor(varargin{1}(1)) != varargin{1}(1))
depends too much on the current implementation of figure handles.
Maybe it would be better to use "! isfigure (varargin{1}(1))" instead?
| diff --git a/scripts/plot/hold.m b/scripts/plot/hold.m
| --- a/scripts/plot/hold.m
| +++ b/scripts/plot/hold.m
| @@ -44,8 +44,10 @@
|
| function hold (varargin)
|
| - if (nargin > 0 && ishandle (varargin{1}))
| + if (nargin > 0 && numel (varargin{1}) == 1 && ishandle (varargin{1}(1)))
| [h, varargin, nargs] = __plt_get_axis_arg__ ("hold", varargin{:});
| + elseif (nargin > 0 && numel (varargin{1}) > 1 && ishandle (varargin{1}(1)))
| + error ('Invalid input or option')
Unless you can provide a better diagnostic, I think this should just
be a call to print_usage.
jwe
- Re: cla() ?, (continued)
- Re: cla() ?, Ben Abbott, 2008/10/04
- Re: cla() ?, Ben Abbott, 2008/10/04
- Re: cla() ?, dbateman, 2008/10/05
- Re: cla() ?, Ben Abbott, 2008/10/05
- [Changeset]: Re: cla() ?, David Bateman, 2008/10/06
- [Changeset]: Re: cla() ?, John W. Eaton, 2008/10/06
- [Changeset]: delete (vector), Ben Abbott, 2008/10/06
- [Changeset]: delete (vector), John W. Eaton, 2008/10/06
- Re: [Changeset]: delete (vector), Michael Goffioul, 2008/10/07
- Re: [Changeset]: Re: cla() ?, Ben Abbott, 2008/10/06
- Re: [Changeset]: Re: cla() ?,
John W. Eaton <=
- Re: [Changeset]: Re: cla() ?, Ben Abbott, 2008/10/06
- Re: [Changeset]: Re: cla() ?, Ben Abbott, 2008/10/06
- Re: [Changeset]: Re: cla() ?, John W. Eaton, 2008/10/06
- Re: [Changeset]: Re: cla() ?, Michael Goffioul, 2008/10/07
- Re: [Changeset]: Re: cla() ?, Ben Abbott, 2008/10/07
- Re: [Changeset]: Re: cla() ?, Michael Goffioul, 2008/10/07
- Re: [Changeset]: Re: cla() ?, David Bateman, 2008/10/07
- Re: [Changeset]: Re: cla() ?, Michael Goffioul, 2008/10/07
- Re: [Changeset]: Re: cla() ?, Ben Abbott, 2008/10/07
- Strange handle behavior (was Re: [Changeset]: Re: cla() ?), Ben Abbott, 2008/10/07