Help "index matrix not consistent"?
1 次查看(过去 30 天)
显示 更早的评论
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?
2 个评论
Walter Roberson
2012-12-12
We already asked you to explain your desired results when you posted this before in http://www.mathworks.co.uk/matlabcentral/answers/55485-how-can-i-cancate-the-array-r-g-b-values
采纳的回答
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)
0 个评论
更多回答(1 个)
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));
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!