Why am I getting a dimension error

??? Error using ==> cat CAT arguments dimensions are not consistent.
Here is the picture I am supposed to split in 3 parts which i have done
now I want to align it but whenever I try I get the error message above
This is how I initially divided my images
figure(1);
b = imread('cw2.jpg');
imshow(b)
[rmax, cmax] = size(b)
part1 = b(1:341, 1:396);
imshow(part1)
part2 = b(341:683, 1:396);
imshow(part2)
part3 = b(683:1024, 1:396);
imshow(part3)
Apparently I am supposed to get the images to the exact size or I will get this error
but whenever I try and get the images to the exact size using decimal points such as 341.33333333333333 or 682.66666666666667, I get a warning message saying
basically i found the size of the picture using this
[rmax, cmax] = size(b)
rmax =
1024
cmax =
396
so I want 396 to stay
but I want to split the image 3 times from x axis to i divide 1024

1 个评论

You cannot select down to anything smaller than 1 pixel, so make all of them 341.
For the dimension error, we need to see your cat()

请先登录,再进行评论。

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Waveform Design and Signal Synthesis 的更多信息

提问:

2013-4-22

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by