MATLAB: Repmat function give error

function cvgabortexturesegmentrun(imfilekMATLABoutfile)

can anyone help me please, when i run this line of code give me the following eroor :
Error using repmat Replication factors must be a row vector of integers or integer scalars.
Error in cvGaborTextureSegmentRun (line 28) imseg(idx, 🙂 = repmat(color(i, :), [], length(idx));

Best Answer

Are you sure it's repmat that you want? The calling syntax looks like you were trying to use reshape() instead. If you're sure repmat was intended, then this might be what you were trying to do,
imseg(idx, :) = repmat(color(i, :), [length(idx),1]);