Help "index matrix not consistent"?

조회 수: 3(최근 30일)
PRIYANGA
PRIYANGA 2012년 12월 12일
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?

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2012년 12월 12일
편집: Azzi Abdelmalek 2012년 12월 12일
domr=[6 7];
domg=[3 4];
domb=[1];
dom=[domr,domg,domb]
%or
dom=cat(2,domr,domg,domb)

추가 답변(1개)

Muruganandham Subramanian
Muruganandham Subramanian 2012년 12월 12일
편집: Muruganandham Subramanian 2012년 12월 12일
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));
  댓글 수: 1
PRIYANGA
PRIYANGA 2012년 12월 13일
Thank you sir,

댓글을 달려면 로그인하십시오.

범주

Find more on Get Started with MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by