diff scripts/general/trapz.m @ 6157:045038e0108a

[project @ 2006-11-13 22:22:53 by jwe]
author jwe
date Mon, 13 Nov 2006 22:22:54 +0000
parents 34f96dd5441b
children 8b0cfeb06365
line wrap: on
line diff
--- a/scripts/general/trapz.m
+++ b/scripts/general/trapz.m
@@ -53,7 +53,7 @@
     have_dim = true;
   endif
   if (nargin == 2)
-    if (size (x) != size (y) && isscalar (y))
+    if (! size_equal (x, y) && isscalar (y))
       dim = y;
       have_dim = true;
     else
@@ -90,7 +90,7 @@
   if (! have_x)
     z = 0.5 * sum (x(idx1{:}) + x(idx2{:}), dim);
   else
-    if (size (x) != size (y))
+    if (! size_equal (x, y))
       error ("cumtrapz: x and y must have same shape");
     endif
     z = 0.5 * sum ((x(idx1{:}) - x(idx2{:})) .*