diff options
Diffstat (limited to 'tests/mime-detection/mysum.m')
-rw-r--r-- | tests/mime-detection/mysum.m | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/mime-detection/mysum.m b/tests/mime-detection/mysum.m new file mode 100644 index 00000000..1c6305d0 --- /dev/null +++ b/tests/mime-detection/mysum.m @@ -0,0 +1,8 @@ +function m=myavg(x) +% MYAVG(X) Calculates the average of the elements +n=length(x); +mysum=0; +for i=1:n + mysum=mysum+x(i) +end +m=mysum/n; |