I like both ideas, and I’ll update matlab_ utilities accordingly.
PS
Sent from my iPad
> On Jul 7, 2019, at 5:36 PM, Sven Schreiber <svetosch(a)gmx.net> wrote:
>
>> Am 07.07.2019 um 20:41 schrieb Riccardo (Jack) Lucchetti:
>>> On Sun, 7 Jul 2019, Sven Schreiber wrote:
>>
>> Actually, you got me thinking about the possibility of having a second
>> argiment to I() (aka F_IMAT); in many cases, you want to construct a
>> matrix that is an identity matrix "plus some zeros"; without loss of
>> backward compatibility, we may introduce an optional 2nd argument to I()
>> such that I(r,c) returns
>>
>> * I(r) ~ zeros(r, c-r) if c > r,
>> * I(c) | zeros(r-c, c) if r < c
>
> You mean r > c, but apart from that, why not.
>
>
>> Besides, I believe this is what Matlab does, so this would also be nice
>> to have when porting scripts from the Octave/Matlab galaxy.
>
> Yes it seems they do that. Of course, if you want to appeal to those
> people, you could also make "eye" an alias for "I", but perhaps
that
> would rather be something for Peter's matlab_utilities package.
>
> cheers
> sven
> _______________________________________________
> Gretl-devel mailing list -- gretl-devel(a)gretlml.univpm.it
> To unsubscribe send an email to gretl-devel-leave(a)gretlml.univpm.it
> Website:
https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/