Am 14.01.2023 um 15:44 schrieb Cottrell, Allin:
On Sat, Jan 14, 2023 at 5:59 AM Sven Schreiber
<sven.schreiber(a)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. (Calling itself
still 2022d-git, but that's a different and cosmetic matter.)
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.)
thanks
sven