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 件のコメント

Walter Roberson
Walter Roberson 2013 年 4 月 22 日
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 ExchangeData Type Conversion についてさらに検索

質問済み:

2013 年 4 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by