Am 10.07.2009 12:49, Riccardo (Jack) Lucchetti schrieb:
> On Fri, 10 Jul 2009, Sven Schreiber wrote:
> 
> 
>>> Oh, sorry, I should have said: the rev() function reverses the order of
>>> the _rows_ of the matrix (from the example above, it could have been the
>>> columns).
>>
>> Would it be worthwhile to generalize this to columns as well? Maybe
>> using an optional second argument or so. I'm not sure about it, and I'm
>> aware of rev(A')', just asking as long as it's still in "design stage".
> 
> If you ask me, I'd rather have one function with the user in charge of
> transposing things twice, rather than two and save the user the
> inconvenience. IMHO, all other things being equal, the fewer functions
> the better. But of course I'm open to change my mind on this.
> 

I agree that two separate functions would not be good. What I meant was
something like:

rev(A,1)        -- reverses row-wise
rev(A,2)        -- reverses col-wise (or maybe rev(A,'c'))
rev(A)          -- defaults to /alias for rev(A,1)

But I don't have a strong opinion, given gretl's short transposition syntax.

-sven

Reply via email to