Skip to content

Instantly share code, notes, and snippets.

@barisesen
Created March 28, 2018 22:30
Show Gist options
  • Save barisesen/7b354e7abe3fc1364d0cd83c97b7f17e to your computer and use it in GitHub Desktop.
Save barisesen/7b354e7abe3fc1364d0cd83c97b7f17e 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