diff --git a/matlab/hess_element.m b/matlab/hess_element.m
index 2c86e78c76dc11f3584081319448e661e8257843..069a0ea9eccdc958e1c278005b215671500cf6de 100644
--- a/matlab/hess_element.m
+++ b/matlab/hess_element.m
@@ -59,7 +59,7 @@ m11{arg2}(elem2) = m11{arg2}(elem2) - h;
 
 % From Abramowitz and Stegun. Handbook of Mathematical Functions (1965)
 % formulas 25.3.24 and 25.3.27 p. 884
-if arg1 == arg2 && elem1 == elem2
+if arg1==arg2
     d = (16*func(p10{:})...
          +16*func(m10{:})...
          -30*func(args{:})...