Error using vertcat Dimensions of matrices being concatenated are not consistent.
1 view (last 30 days)
Show older comments
jeffin on 20 Nov 2015
Answered: Walter Roberson on 20 Nov 2015
the above error has come when i run the code below.
srcFiles = dir('......bjectCategories\brain\*.jpg');
for i = 1 : length(srcFiles)
I = imread(filename);
J = imresize(I,[58 74]);
B = J(:);
kindly help me to correct error. thanks in advance.
Walter Roberson on 20 Nov 2015
imresize(I,[58 74]) can be different sizes if some of the images are Truecolor (3 dimensional) and others are 2 dimensional.
Find more on Images in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!