--- a/inst/op_inv.m
+++ b/inst/op_inv.m
@@ -112,7 +112,7 @@
     error('The second input argument is not numeric');
 end
 %checking a and b dimensions
-if (rowA~=rowB)|(colA~=colB)
+if (rowA~=rowB)||(colA~=colB)
     error('The dimensions of input arguments are not the same');
 else
     %working dimensions