??? Error using ==> vertcat CAT arguments dimensions are not consistent.
1 回表示 (過去 30 日間)
古いコメントを表示
i want a help to figure out this error named
??? Error using ==> vertcat
CAT arguments dimensions are not consistent.
in these specific lines
for j = 2:n-1
a1 = [difference_red(i-1,j-1) difference_red(i-1,j) difference_red(i-1,j+1) difference_red(i,j-1) difference_red(i,j) difference_red(i,j+1) difference_red(i+1,j-1) difference_red(i+1,j) difference_red(i+1,j+1)];
b1 = [difference_blue(i-1,j-1) difference_blue(i-1,j) difference_blue(i-1,j+1) difference_blue(i,j-1) difference_blue(i,j) difference_blue(i,j+1)
difference_blue(i+1,j-1) difference_blue(i+1,j) difference_blue(i+1,j+1)];
c1 = [difference_green(i-1,j-1) difference_green(i-1,j) difference_green(i-1,j+1) difference_green(i,j-1) difference_green(i,j) difference_green(i,j+1) difference_green(i+1,j-1) difference_green(i+1,j) difference_green(i+1,j+1)];
a2 = a1(a1<=0.7);
b2 = b1 (b1<= 0.7);
c2 = c1 (c1<=0.7);
med_red (i,j)= median (a2);
med_blue (i,j)= median (b2);
med_green (i,j)= median (g2);
end
1 件のコメント
Jan
2011 年 10 月 7 日
Please use proper code formatting as explained in the link "Markup help" on this page.
回答 (2 件)
Jan
2011 年 10 月 7 日
Please post the line in which the error occurs.
The VERTCAT command is called implicitely if you use "[...]". I guess you have a linebreak inside, which is interpreted as a semicolon (ugly!). Then use this notation: a1 = [difference_red(i-1,j-1), difference_red(i-1,j), ... difference_red(i+1,j+1)]; Insert commas and use the line continuation "...".
0 件のコメント
prem preet
2011 年 10 月 7 日
1 件のコメント
Jan
2011 年 10 月 7 日
Does it solve your problem? Then accepting the answer would be the signal, that others do not have to help anymore.
参考
カテゴリ
Help Center および File Exchange で Image Filtering and Enhancement についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!