Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
prem preet
prem preet le 7 Oct 2011
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 commentaire
Jan
Jan le 7 Oct 2011
Please use proper code formatting as explained in the link "Markup help" on this page.

Connectez-vous pour commenter.

Réponses (2)

Jan
Jan le 7 Oct 2011
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 le 7 Oct 2011
thnx for your suggestion ... i appreciate it ...
  1 commentaire
Jan
Jan le 7 Oct 2011
Does it solve your problem? Then accepting the answer would be the signal, that others do not have to help anymore.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Image Filtering and Enhancement dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by