Unable to perform assignment because the indicies on the left side are not compatible with the size of the right side error

1 view (last 30 days)
I am trying to search for a tag in matlab and am getting this error code. Ive attached an image of my screen with all the variables in the workspace.

Answers (1)

Harry Laing
Harry Laing on 9 Dec 2020
It is better to put the actual code in your question rather than just screenshots. But from your picture it looks as though you are expecting a single value from your sum() function? Try putting a breakpoint on line 37, run your code, then manually type (copy) sum(y(k:k+mn-1).*PN) into the command window to see the result. If the result is not what you expected, then there's your issue.
I've no idea what you're trying to do, so that's the best I can give you.

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!