octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #64395] corr cannot handle row vectors


From: Rik
Subject: [Octave-bug-tracker] [bug #64395] corr cannot handle row vectors
Date: Mon, 10 Jul 2023 20:04:16 -0400 (EDT)

Follow-up Comment #10, bug #64395 (project octave):

I notice that corr() for a scalar always returns 1.  This is different from
Matlab which returns NaN.  Simple test case:


corr (5)


Also, shouldn't non-numeric input throw an error?  For the scalar special case
there is no such checking.


corr (struct ())
ans = 1


Matlab throws an obtuse error, but still an error, for the above code.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64395>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]