user3758664
user3758664

Reputation:

How can I add arrays in an image

I have image with size of 106X351 logical.When I want to sum all of arrays in this image, I've faced with this error "Index exceeds matrix dimensions."

s=sum(im);

Is there any function that I can use?

Upvotes: 0

Views: 64

Answers (1)

Stewie Griffin
Stewie Griffin

Reputation: 14939

If your error is in that line, most likely you have a variable named sum. Try clearing the workspace and change the name of any variables named sum in you script and give it a try

Upvotes: 1

Related Questions