El divendres, 5 de juliol de 2019, a les 7:58:14 EDT, GoSim va escriure:
I don't have Matlab.
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
For the case it is useful, in Matlab 2019a:
>> C = [1 2 3;4 5 6; 2 4 6]
C =
1 2 3
4 5 6
2 4 6
>> D=[4 5 8]'
D =
4
5
8
>> lsqlin(C,D,[],[])
ans =
NaN
NaN
NaN
Ok so it appears the compatibility bug is that MATLAB produces a non-error output of NaNs, and Octave throws an error when the inputs are not linearly independent. Might be worth playing around with the MATLAB outputs a bit more to see if there are any other corner cases octave doesn't capture.
Whether or not to add a noncompatible flag to have octave clip out the linearly dependent input as per GoSim's suggestion may warrant further discussion.