Undefined function 'symsum' for input arguments of type 'uint8'

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?

 채택된 답변

Steven Lord
Steven Lord 2020년 6월 3일
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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Mathematics에 대해 자세히 알아보기

태그

질문:

2020년 6월 3일

답변:

2020년 6월 3일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by