octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

__plt__.m redundancies


From: Rik
Subject: __plt__.m redundancies
Date: Thu, 27 Jun 2013 09:44:19 -0700

6/27/13

All,

I happened to be looking in scripts/plot/private/__plt__.m and found that
there is a dispatch table in the subfunction __plt2__ which checks whether
the x input is a scalar, vector, or matrix and whether the y input is a
scalar, vector, or matrix and then calls the appropriate subfunction such
as __plt2sv__ for scalar/vector plotting.

I checked in each of the 6 subfunctions and they check the number of input
arguments with nargin as well as re-checking that each of the inputs is a
scalar, vector, or matrix.  This is redundant and probably arose as the
code evolved in time.  Does anyone know why the input checks in the leaf
functions cannot be deleted in favor of the earlier checks?

--Rik


reply via email to

[Prev in Thread] Current Thread [Next in Thread]