Mercurial > octave-nkf
comparison scripts/linear-algebra/dot.m @ 8664:e07e93c04080
style fixes
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 04 Feb 2009 10:56:23 -0500 |
parents | a1dbe9d80eee |
children | eb63fbe60fab |
comparison
equal
deleted
inserted
replaced
8663:4238f2600a17 | 8664:e07e93c04080 |
---|---|
39 endif | 39 endif |
40 if isvector (y) | 40 if isvector (y) |
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 .* 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 .* y, dim); |
52 endif | 52 endif |
53 | 53 |
54 endfunction | 54 endfunction |