octave-maintainers
[Top][All Lists]
Advanced

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

Re: Deprecating statistics/base/values.m


From: Rik
Subject: Re: Deprecating statistics/base/values.m
Date: Mon, 09 Aug 2010 09:00:21 -0700

>  
> I took a quick look. There is a slight difference. Values always returns
> a Nx1 vector. Which is equivalent to ...
> 
>     values = @(x) unique (x)(:)

This is why I want to deprecate the function, rather than just immediately
remove it.  The function will continue to exist for at least one more
Octave release and, in the mean time, will print out a warning that the
function is scheduled to be removed.  This allows anyone using the function
to re-code.  In this case to unique(x(:)), if having a column vector is
important.

> 
> There is no "values" function in Matlab, plus it only gives a little bit of
> extra functionality ... so my (very small) vote is to deprecate, or move into
> OctaveForge/statistics, since having it adds redundancy and clutter, as well 
> as
> possibly leading people down a bad path (like "cut" versus "histc" -- one 
> should
> use the latter for compatibility and consistency, but the former was easy for 
> me
> to find and get used to)

Yes, I had looked as well and there is no compatibility argument for
keeping 'values'.  To my mind, 'unique' is also clearer about what it does.
 'values' might mean return entries not equal to 0, return the absolute
values, or something else.  I would need to check the documentation each time.

--Rik


reply via email to

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