Error using horzcat dimensions
古いコメントを表示
This is my code
pra= kependudukan((kependudukan(:,6)==1),:);
ks1=kependudukan((kependudukan(:,6)==2),:);
ks2=kependudukan((kependudukan(:,6)==3),:);
Characteristics = {'usia','pendidikan','pekerjaan','Tanggungan','status','luas'};
pairs = [1 2; 1 3; 1 4; 2 3; 2 4; 3 4; 1 5; 1 6; 2 5; 2 6; 3 5; 3 6; 4 5; 4 6;5 6; 6 4];
h = figure;
for j = 1:16,
x = pairs(j, 1);
y = pairs(j, 2);
subplot(4,4,j);
plot([pra(:,x) ks1(:,x) ks2(:,x)],...
[pra(:,y) ks1(:,y) ks2(:,y)], '.');
xlabel(Characteristics{x},'FontSize',10);
ylabel(Characteristics{y},'FontSize',10);
the error: Error using horzcat Dimensions of matrices being concatenated are not consistent.
回答 (1 件)
Rik
2018 年 5 月 27 日
You are try to concatenate (i.e. combine) some arrays that don't have matching sizes. The code below should work, but might not be what you mean.
plot([pra(:,x);ks1(:,x);ks2(:,x)],...
[pra(:,y);ks1(:,y);ks2(:,y)], '.');
カテゴリ
ヘルプ センター および File Exchange で Fuzzy Logic Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!