[bug #48564] mrdivide and mldivide do not compatibly handle divisor ndim>2
Nicholas Jankowski <[email protected]>
| Newsgroups | gmane.comp.gnu.octave.bugs |
|---|---|
| Message-ID | <[email protected]> |
Please use the bug tracker to post updates to a bug report. The mailing list is intended as a read-only notification stream. Info posted to this mailing list address won't appear in the tracker database where it is most useful.
Follow-up Comment #23, bug #48564 (group octave):
> Among the many things I find odd here is why scalars aren't treated
> uniformly. If one of the operands, B or A, is a scalar why doesn't that just
> switch the operation to element-by-element?
I think that behavior is ok, and actually preferred. There's an ambigiuity
with the scalar case and a 1 column/row vector with mrdivide and mldivide.
x = B/A solves the system of linear equations x*A = B for x
x = 14/[1;2;3] corresponds to x*[1;2;3] = 14 which solves to x = [1 2 3]. if
it went to elementwise math right away, you'd get x=[14;7;4.67].
since the primary purpose of the operator is the matrix solution, it should
only fall back on elementwise math when there isn't a valid matrix math
definition.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?48564>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaZh0+QAKCRCqLAuaBUf3 Ti8CAQCTu484RpmHn8lWQIULxCfIjGBe0B4bEocuXY6GaKLctwEApXUc8LYjbQZ8 sOPrtbusBxVv4NFnJ7cpH2sRE+58LQA= =kNEZ -----END PGP SIGNATURE-----