marker={'r','b','g'};
for i=1:size(X,3)
for r=1:size(X,1)
for c=1:size(X,2)
text(X(r,c,i),Y(r,c,i),Z(r,c,i),num2str(dof(c,r,i)))
end
end
end
For each value of i
, I want to use a different color as given in marker
to plot num2str(dof(c,r,i))
. How can I do that? Thanks.
I'm on the wrong computer (no matlab for testing) right now, but
text(X(r,c,i),Y(r,c,i),Z(r,c,i),num2str(dof(c,r,i)), 'Color', marker{i})
should work. There will be problems if size(X,1)>3 this way however.