Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
anyone knows how to address th Subscripted assignment dimension mismatch, I just cannot find why.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
for i = length(indexLabel):-1:2
temxmat = newCenters((indexLabel(i-1)+1):indexLabel(i),1);
temymat = newCenters((indexLabel(i-1)+1):indexLabel(i),2);
ycoord = round(mean(newOutCenters((indexLabel(i-1)+1):indexLabel(i),2)));
distmat = temxmat(2:end)-temxmat(1:(end-1));
avdist = mean(distmat(distmat<threshold));
xmat =[];
ymat =[];
cellReg = find(distmat(distmat>=threshold));
for j = (length(cellReg)):-1:1
numofpts = floor(distmat(cellReg(j))/avdist-1);
addxmat =transpose(1:numofpts)*avdist+ones(numofpts,1)*temxmat(cellReg(j));
xmat = [temxmat(1:j);addxmat;temxmat((j+1):length(temxmat))];
addymat = ones(numofpts,1).*ycoord;
ymat = [temymat(1:j);addymat;temymat((j+1):length(temymat))];
end
newCenters((indexLabel(i-1)+1):length(xmat),1)=xmat;
newCenters((indexLabel(i-1)+1):length(ymat),2)=ymat;
end
Subscripted assignment dimension mismatch.
7 Kommentare
Image Analyst
am 24 Jul. 2016
And tell us in words what this code does. Something about circles perhaps? Make sure that if you paste your code into a new editor window (which is what we'd do) it will produce the error it said. Right now we'd just get errors about indexLabel and newOutCenters being undefined. And, like we've already asked, give the complete error message - ALL the red text, not just some of it.
Antworten (0)
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!