MATLAB: Undefined function ‘symsum’ for input arguments of type ‘uint8’

symsum

for i = 1 : m
for c = 1 : n
for k = 1 : w
for j = (((k - 1)* arr(k)+1) : (k * arr(k)))
total(i,k) =symsum(image1(i,c),j) / arr(k);
end;
end;
end;
end;
this is a preview of the equation i typed it on matlab but i get an error as "Undefined function 'symsum' for input arguments of type 'uint8'" .
this is the actual equation.
where [m n] = size of the image
arr(k) = width of the kth stripe
j = j = (k – 1)* arr(k)+1) : k * arr(k)
image(i,c) = gray value at the ith row and cth column
can you help with with an equation for this?

Best Answer

Nowhere in your code do you define any symbolic variables so symsum is not the right tool to use in this situation. Use sum and specify the dimension over which you want to sum.
A = randi(10, 5, 5)
sum(A, 1) % sum down columns
sum(A, 2) % sum across rows
Related Question