Help "index matrix not consistent"?

I have to writhe matlab code for image compression.
i got the three values domr, domg, domb
domr=[6 7];
domg=[3 4];
domb=[1];
dom=cat(3,domr,domg,domb); ??? Error using ==>cat CAT arguments dimensions are not consistent.
Error in ==>
FVQLOWCOMPWMINCOLOR at 295
dom=cat(1,domr,domg,domb);
But I can't concatenate the values.I got the Error result " Cat argument not consistent" how can I concatenate that element? any body please help me?

 Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 12 Déc 2012
Modifié(e) : Azzi Abdelmalek le 12 Déc 2012

0 votes

domr=[6 7];
domg=[3 4];
domb=[1];
dom=[domr,domg,domb]
%or
dom=cat(2,domr,domg,domb)

Plus de réponses (1)

Muruganandham Subramanian
Muruganandham Subramanian le 12 Déc 2012
Modifié(e) : Muruganandham Subramanian le 12 Déc 2012

0 votes

The problem is size(domr), size(domg) & size(domb) is not equal..
or
you can try like this:
dom=cat(1,domr(1),domg(1),domb(1));
dom=cat(1,domr(2),domg(2),domb(1));

Catégories

En savoir plus sur Images dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by