Created
March 28, 2018 22:30
-
-
Save barisesen/7b354e7abe3fc1364d0cd83c97b7f17e to your computer and use it in GitHub Desktop.
matlab cumsum function source code !
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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