octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #60482] hist() misses error for non-numeric in


From: anonymous
Subject: [Octave-bug-tracker] [bug #60482] hist() misses error for non-numeric input
Date: Fri, 30 Apr 2021 21:57:28 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0

Follow-up Comment #5, bug #60482 (project octave):

Please comment on this conceptual approach:


if (nargout > 1) # output argument specified
  if (nargin == 2) # should be only data and bins
    if ( !isnumeric (arg2)) # invalid data type
      error ("second argument should be numeric when seeking a return
value.")
    end
  end
end


Hopefully this can avoid having to check against a big list of keywords, which
would need to be maintained with a lot of effort.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60482>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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