comparison scripts/general/polyarea.m @ 11472:1740012184f9

Use uppercase for variable names in error() strings to match Info documentation. Only m-files done.
author Rik <octave@nomad.inbox5.com>
date Sun, 09 Jan 2011 21:33:04 -0800
parents be55736a0783
children fd0a3ac60b0e
comparison
equal deleted inserted replaced
11471:994e2a93a8e2 11472:1740012184f9
55 a = abs (sum (x .* (shift (y, -1) - shift (y, 1)))) / 2; 55 a = abs (sum (x .* (shift (y, -1) - shift (y, 1)))) / 2;
56 else 56 else
57 a = abs (sum (x .* (shift (y, -1, dim) - shift (y, 1, dim)), dim)) / 2; 57 a = abs (sum (x .* (shift (y, -1, dim) - shift (y, 1, dim)), dim)) / 2;
58 endif 58 endif
59 else 59 else
60 error ("polyarea: x and y must have the same shape"); 60 error ("polyarea: X and Y must have the same shape");
61 endif 61 endif
62 endfunction 62 endfunction
63 63
64 %!shared x, y 64 %!shared x, y
65 %! x = [1;1;3;3;1]; 65 %! x = [1;1;3;3;1];