error !! horzcat CAT arguments dimensions are not consistent.
显示 更早的评论
hi sir i am very much new to matlab ..i have two images ..i want to use "imoverlay" for the images but whenever i run it ,i get error saying horzcat arguments dimension are consistent ..i am working on retinal image analysis..belo i have uploaded my code and error.sorry for not providing sufficient info error is" horzcat CAT arguments dimensions are not consistent.
Error in ==> file1>filter_Callback at 692 C = horzcat(I2,1);"


3 个评论
Matt Kindig
2013-10-17
What are the sizes of
I1 and I2?
Please take into account that problem is not urgent. The fact, that you have to submit it tomorrow does not encourage people to stop their work and care about your problem at first.
If you really want the forum to help yout, remove the "urgent" and insert a copy of the complete error message, instead of the short paraphrased version. Then we would not have to guess, where the problem occurres.
vidya
2013-10-17
采纳的回答
更多回答(1 个)
Let me guess, where the problem is:
pad = zeros (size(I1,1) - size(I2,1), size(I2,2));
%I2 = [I2 , pad]; %Append the rows of zeros to the bottom of I2
C = horzcat(I2, pad);
Here the 1st dimension of pad does not match, because it must be size(I2, 1).
Guessing is inefficient. Please do not post a question without showing the complete error message in the future. Thanks!
类别
在 帮助中心 和 File Exchange 中查找有关 Software Development Tools 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
