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

조회 수: 1 (최근 30일)
  댓글 수: 1
DGM
DGM 2021년 11월 26일
As the error indicates, I'm going to assume that NWS is not the same width as the windowed segment. Since segment length may vary and NWS is an ostensibly numeric array of fixed width, this is bound to cause errors. If you need to store a bunch of variable-length vectors, use a cell array or something.

댓글을 달려면 로그인하십시오.

답변 (1개)

Shanmukha Voggu
Shanmukha Voggu 2021년 11월 29일
Hi,
The Workaround for the above error can be using the cell array
First, initialize the NWS just before for loop
NWS={};
Later, update the NWS as below inside for loop
NWS{end+1}=BW.*WordSeg;
Finally, use the NWS as below inside the plot statement
plot(app.UIAxes, NWS{1});
Refer this for more information.

카테고리

Help CenterFile Exchange에서 Blackman에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by