-
-
Save kevsersrca/fbff85eb7f926272cdba75c3bb8e0d2a to your computer and use it in GitHub Desktop.
matlab cumsum function source code !
This file contains hidden or 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