Skip to content

Instantly share code, notes, and snippets.

@kevsersrca
Forked from barisesen/cumsum.m
Created March 28, 2018 22:30
Show Gist options
  • Save kevsersrca/fbff85eb7f926272cdba75c3bb8e0d2a to your computer and use it in GitHub Desktop.
Save kevsersrca/fbff85eb7f926272cdba75c3bb8e0d2a to your computer and use it in GitHub Desktop.
matlab cumsum function source code !
function X = cumSumFunc(image)
[m,n] = size(image);
X = zeros(m,n);
X(1,:) = image(1,:);
for i=2:m
for j=1:n
X(i,j) = image(i,j) + X(i-1,j);
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment