??? Error using ==> plot3 Data must be a single matrix Y or a list of pairs X,Y

2 ビュー (過去 30 日間)
Tomas
Tomas 2013 年 11 月 12 日
回答済み: Walter Roberson 2013 年 11 月 13 日
ans = Z{1}
[1x3 double]
ans = Z{2}
Columns 1 through 6
[1x3 double] [1x3 double] [1x3 double] [1x3 double] [1x3 double] [1x3 double]
Column 7
[1x3 double]
ans = Z{3}
[1x3 double] [1x3 double]
nclust = length(Z);
thismap = copper(nclust); %or pink or flag or hot or ...
clustcoords = cellfun( @cell2mat, Z, 'Uniform', 0 );
for k = 1 : length(clustcoords)
XYZ = clustcoords{k};
plot3(XYZ(:,1), XYZ(:,2), XYZ(:,3), thismap(k,:));
hold on
end
??? Error using ==> plot3
Data must be a single matrix Y or a list of pairs X,Y
Error in ==> knew at 107
plot3(XYZ(:,1), XYZ(:,2), XYZ(:,3), thismap(k,:));
can anyone help ?
Thanks

回答 (1 件)

Walter Roberson
Walter Roberson 2013 年 11 月 13 日
plot3(XYZ(:,1), XYZ(:,2), XYZ(:,3), 'Color', thismap(k,:));

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by