I am coding with Matlab, and I get the following error for the bold line (containers = [containers(1:j-1); containers(j+1:end)]😉
Error using vertcat
CAT arguments dimensions are not consistent.
Error in fillContainerWithPolygons (line 77)
containers = [containers(1:j-1); containers(j+1:end)];
The problem is that I get it just sometimes(not always).
Just in case, containers is a set of the matrix, for example I got error for `containers(1:j-1) = [13×2 double] and containers(j+1:end) =[4×2 double]
I searched and googled a lot but I did not find the problem,
Any idea will be appreciated.
Hmm, you can avoid that by just saying
Also there’s something off in your question because
containers(1:j-1)can’t be 13×2, it’s got to be nx1. I assume you meancontainers(1:j-1, :).I think the reason is that
j+1:endis probably just one element, and it’s being treated like a column because you’re not specifyingj+1:end, :.