error again in CAT arguments dimensions are not consistent.

I have following code and i get an error ,
genedata=1:100;
IDX = kmeans(genedata',20);
genenum = cell(20,1);
for i = 1:20
genenum{i} = sum(IDX == i);
end
genes = cell(20,1);
for K = 1 : 20
genes{K} = genedata(IDX==K);
end
final=[num2cell((1:20)') genenum genes];
CAT arguments dimensions are not consistent.
Error in ==> v at 24
final=[num2cell((1:20)') genenum genes]
I have genes =[1x4 double]
[1x5 double]......
how to dispaly in matrix form
please help

4 件のコメント

Andrei Bobrov
Andrei Bobrov 2011 年 11 月 21 日
see http://www.mathworks.com/matlabcentral/answers/21772-error-cat-arguments-dimensions-are-not-consistent
FIR
FIR 2011 年 11 月 21 日
why those values are contionous
for ex...1,2,3,4,5,6,7
8,9,10,11,12,13,14
i have atached a pdf ,please see see table7,page num12
http://www.sendspace.com/file/29youd
Titus Edelhofer
Titus Edelhofer 2011 年 11 月 21 日
Hi FIR,
strange, I just copied your code and it works fine, I get
final =
[ 1] [4] [1x4 double]
[ 2] [7] [1x7 double]
...
Titus
FIR
FIR 2011 年 11 月 21 日
hai titus r u getting continous answer ,like 1,2,3,4,5....

回答 (0 件)

この質問は閉じられています。

タグ

質問済み:

FIR
2011 年 11 月 21 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by