??? Error using ==> plot3 Data must be a single matrix Y or a list of pairs X,Y
2 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Walter Roberson
on 13 Nov 2013
plot3(XYZ(:,1), XYZ(:,2), XYZ(:,3), 'Color', thismap(k,:));
0 Comments
See Also
Categories
Find more on Line Plots 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!