comparison scripts/linear-algebra/dot.m @ 12110:8166d596247e release-3-2-x

fix dot
author Jaroslav Hajek <highegg@gmail.com>
date Thu, 26 Nov 2009 14:08:48 +0100
parents 1bf0ce0930be
children 050b8c0e1531
comparison
equal deleted inserted replaced
12109:10dcb8b64e4a 12110:8166d596247e
41 y = y(:); 41 y = y(:);
42 endif 42 endif
43 if (! size_equal (x, y)) 43 if (! size_equal (x, y))
44 error ("dot: sizes of arguments must match"); 44 error ("dot: sizes of arguments must match");
45 endif 45 endif
46 z = sum(x .* y); 46 z = sum(x .* conj (y));
47 else 47 else
48 if (! size_equal (x, y)) 48 if (! size_equal (x, y))
49 error ("dot: sizes of arguments must match"); 49 error ("dot: sizes of arguments must match");
50 endif 50 endif
51 z = sum(x .* y, dim); 51 z = sum(x .* conj (y), dim);
52 endif 52 endif
53 53
54 endfunction 54 endfunction