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 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