フィルターのクリア

??? Error using ==> vertcat CAT arguments dimensions are not consistent.

1 回表示 (過去 30 日間)
prem preet
prem preet 2011 年 10 月 7 日
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
Jan 2011 年 10 月 7 日
Please use proper code formatting as explained in the link "Markup help" on this page.

サインインしてコメントする。

回答 (2 件)

Jan
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 "...".

prem preet
prem preet 2011 年 10 月 7 日
thnx for your suggestion ... i appreciate it ...
  1 件のコメント
Jan
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 ExchangeImage Filtering and Enhancement についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by