Im new to Octave and playing around with the console.
why when comparing matrices, the expression is not evaluates as boolean :
example:
>>
== is for element-wise comparison of two matrices. To check whether two matrices are same or not, use isequal.
Sardar's answer is correct, but when it comes to computational time, I think that my alternative answer is better: You can as well check that all elements of the boolean matrix A == A are 1, i.e., that the sum of 1s in the matrix A==A equals the number of elements of A, i.e:
sum((A == A)(:)) == numel(A)
ans = 1
Where the operator (:) simply vectorizes the matrix A==A so that it can be added with sum(). Compare the two answers when you matrix is quite big, for instance by defining A = rand(1e4), the computation time is considerably different...