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

1 次查看(过去 30 天)
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.

回答(1 个)

Harry Laing
Harry Laing 2020-12-9
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.

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by