How to check if two vectors are equal? : <p>From <a href="https://octave.org/doc/v4.2.2/Comparison-Ops.html" rel="nofollow noreferrer">documentation</a>:</p>

<blockquote>
  <p>All of Octave’s comparison operators return a value of 1 if the
  comparison is true, or 0 if it is false. For matrix values, they all
  work on an element-by-element basis. Broadcasting rules apply. See
  Broadcasting. For example:</p>

<pre><code>[1, 2; 3, 4] == [1, 3; 2, 4]
     ⇒  1  0
         0  1
</code></pre>
</blockquote>

<p>Oopsie. So I can't straightforwardly use <code>==</code> to check if two vectors/matrices are equal.</p>

<p>Of course, I can compare the matrix returned by <code>==</code> with <code>ones</code> to see if it only has <code>1</code>s - but this begs the question, since I need to be able to compare vectors/matrices to do this!</p>

<p>Just to be clear: for me two vectors are equal if all elements on same positions are equal; so these are equal vectors</p>

<pre><code>[1,2,3,4]
[1,2,3,4]
</code></pre>

<p>These are not:</p>

<pre><code>[1,2,3,4]
[1,2,4,3]
</code></pre>

<p>And these are not as well:</p>

<pre><code>[1,2,3,4]
[1,2,3,5]
</code></pre>

<p>How to achieve this?</p>
