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

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

[Octave-bug-tracker] [bug #63512] does not define the inequality of vect


From: Ruslan
Subject: [Octave-bug-tracker] [bug #63512] does not define the inequality of vectors
Date: Wed, 14 Dec 2022 04:07:28 -0500 (EST)

Follow-up Comment #6, bug #63512 (project octave):

Yes, of course, if you use the comparison icon ( == ) in the condition, then
using the ELSE branch, you can detect non-equality of vectors.
 But the icon condition ( != ) it should also work as a logical comparison.
 So, I think this is a BUG in OCTAVE and it is desirable to fix it.
 Perhaps this BUG is sitting somewhere very deep and looks like (I checked) in
the comparison operation ( != ) the last component of the vector is not
checked. That is, if the vector has 3 components and more, then the last
component is ignored when checking if( != )
-----------------------
RUSLAN
-----------------------

[comment #2 комментарий №2:]
> I have re-written the test code from comment #0 in a way that it runs both
under Matlab and under Octave:
> 
> 
> clearvars
> 
> a(1,1) = 1;
> a(2,1) = 3;
> 
> b(1,1) = 1;
> b(2,1) = 2;
> 
> 
> if (a(:,1) ~= b(:,1))
>  display('NOT EQUAL')
> else
>  display('Not NOT EQUAL')
> end
> 
> 
> Running this code under Octave (7.3.0) and under today's online Matlab, I
get the SAME result for both: "not NOT EQUAL". 
> 
> So I would consider the current Octave behavior Matlab compatible, and a
change of the result of the above test code would break Matlab compatibility.
> 
> Do I miss the point here, or is this issue INVALID? 
> 
> (Please do let me know why you think that this Octave behavior is a bug, if
you still have this opinion, dear original reporter of comment #0.)


    _______________________________________________________

Reply to this item at:

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

_______________________________________________
Сообщение отправлено по Savannah
https://savannah.gnu.org/




reply via email to

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