Diff of /@mp/private/precAndSize.m [000000] .. [de14c2]  Maximize  Restore

Switch to side-by-side view

--- a
+++ b/@mp/private/precAndSize.m
@@ -0,0 +1,28 @@
+if (isa (x, 'mp'))
+ precision = x(1).precision;
+ if (~isa (y, 'mp'))
+  y = mp(y, precision);
+ end
+else
+ precision = y(1).precision;
+ x = mp (x, precision);
+end
+
+[sx, sy] = deal (size (x),  size (y));
+[ex, ey] = deal (prod (sx), prod (sy));
+if (~all (sx == sy))
+ if (~(1 == length(x) | 1 == length(y)))
+  disp (['size of matrix 1 => ', num2str(sx(1)), 'x', num2str(sx(2))]);
+  disp (['size of matrix 2 => ', num2str(sy(1)), 'x', num2str(sy(2))]);
+  error (['Size mismatch for mp objects']);
+ end
+end
+
+if (ex >= ey)
+  [out_rval, out_ival] = deal (cell (sx));
+  outn = zeros (sx);
+else
+  [out_rval, out_ival] = deal (cell (sy));
+  outn = zeros (sy);
+end
+