From 5d69a524f81f234b3fbc41d49ba18d6f6886baba Mon Sep 17 00:00:00 2001 From: jcorgan Date: Thu, 3 Aug 2006 04:51:51 +0000 Subject: Houston, we have a trunk. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@3122 221aa14e-8319-0410-a670-987f0aec2ac5 --- gnuradio-core/src/utils/runsum.m | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 gnuradio-core/src/utils/runsum.m (limited to 'gnuradio-core/src/utils/runsum.m') diff --git a/gnuradio-core/src/utils/runsum.m b/gnuradio-core/src/utils/runsum.m new file mode 100644 index 000000000..0f530b015 --- /dev/null +++ b/gnuradio-core/src/utils/runsum.m @@ -0,0 +1,9 @@ +function r = runsum(x) + len = length(x); + r = zeros (1, len); + r(1) = x(1); + for i = 2:len; + r(i) = r(i-1) + x(i); + endfor; +endfunction; + -- cgit