Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/814129/image.png)
1 comentario
DGM
el 26 de Nov. de 2021
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.
Respuestas (1)
Shanmukha Voggu
el 29 de Nov. de 2021
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});
0 comentarios
Ver también
Categorías
Más información sobre Environmental Models en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!