On Fri, 28 Sep 2012, Summers, Peter wrote:
fwiw ($0.02?), I find the trimr function very useful. It helps
when translating, for example.
Thanks, Peter. That comment jogs my memory: I think I introduced it
for ease of translation from another matrix-processing language.
Allin.
On Fri, 28 Sep 2012, Sven Schreiber wrote:
> And while I'm at it: I also noticed trimr() which trims rows. Don't know
> whether that's new, but why introduce a special function for this
> operation, couldn't it always be easily done by indexing, as in
> M[ttop+1:rows(M)-tbot] ?
It could. But one point to bear in mind (apart from
user-friendliness) is that a built-in shortcut such a trimr()
is in principle more efficient than the long-hand version, since it
involves less parsing of user input. Whether that's of practical
importance, I'm not sure.
Allin Cottrell