On Sat, Jan 14, 2023 at 12:48 PM Sven Schreiber
<sven.schrei...@fu-berlin.de> wrote:
>
> Am 14.01.2023 um 15:44 schrieb Cottrell, Allin:
>
> On Sat, Jan 14, 2023 at 5:59 AM Sven Schreiber
> <sven.schrei...@fu-berlin.de> wrote:
>
> <console>
>
> ? m = ones(4,3)
> ? div = {1, 0.2, 5}
> ? X = m / div
> Ungültiges Argument # = invalid arg
>
> What version of gretl is giving you that error? I'm not seeing any error 
> there.
>
> Well, it's the recent snapshot on Windows from Jan 7th.

I just tried the Jan 1 and Jan 10 Windows snapshots, in both English
and German, and saw no such error. I can't really believe in this
error without seeing a screenshot where the relevant commands are
prefaced by "clear".

>  But obviously the result is wrong and it's clear that in linear algebra 
> terms there is no solution. So what is eval doing there?
>
> It's doing just what Matlab's mrdivide() does, namely, computing a
> least squares solution in the non-square case. This point is not
> documented in the matrix chapter of the Gretl User's Guide, something
> that should be fixed.
>
> Right, OK.  So what's actually recommended in those and similar cases, using 
> the mols() function or the "/" or "\" operators? (Provided the residuals 
> aren't wanted afterwards, which are only provided by mols.)

Is a recommendation really called for here? I mean, do as you please:
the results will be the same to machine precision.

One might say that enabling the least-squares solution via "/" is
redundant given the existence of mols(), but if it were not enabled
our right-division wouldn't work like other software such as Matlab,
and cross-compatibility is nice to have if it's not too hard to
arrange.

BTW the matrix chapter of the Guide (in git) now gives a fuller
account of right-division.

Allin
_______________________________________________
Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it
To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it
Website: 
https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/

Reply via email to