MATLAB: CAT arguments dimensions are not consistent.

color

for i = 1:size(LinkMat,1)
d = LinkMat(:,6)/(c*10);
plot([LinkMat(i,2),LinkMat(i,4)],[LinkMat(i,3),LinkMat(i,5)], 'Color', [0 d 0] );
end
I am getting error at the Plot function probably due to Color. Can't we specify a variable in the matrix ???

Best Answer

as you get CAT dimensions consistency then your equation " d = LinkMat(:,6)/(c*10);" does not return a scalar but a matrix , try to correct so as the color vector to be comprised of three scalars