i have Z={1x1 cell} {1x7 cell} {1x2 cell}
for j=1:k2
for d=1:length(Z{j})
B=Z{j}{d}
if (j==j)
plot3(B(1),B(2),B(3),'*b')
end
end
end
I want to plot if each j had other color
Thanks.

댓글 수: 7

Walter Roberson
Walter Roberson 2013년 11월 18일
Why are you testing if j==j ??
Are you trying to do line plots or trying to do dot plots?
Tomas
Tomas 2013년 11월 18일
I want to plot each cell,{1x1 cell} {1x7 cell} {1x2 cell} only have similar color, i want different color
[k1,k2]=size(Z)
[1,3]
if j=1 {1x1 cell} if j=2 {1x7 cell} if j=3 {1x2 cell}
Walter Roberson
Walter Roberson 2013년 11월 18일
Okay, but why are you testing "if (j==j)" ? The only case in which a number is not equal to itself is if the number holds NaN.
When you plot each cell, are you wanting a line plot or a scatter plot?
Could you confirm that you only want to use exactly 3 values from each cell, rather than three columns or three rows ?
Tomas
Tomas 2013년 11월 18일
Z are cluster, i have three cluster if j=1 {1x1 cell} cluster if j=2 {1x7 cell} if j=3 {1x2 cell} i need line plot, i want to use 3 values from each cell
Tomas
Tomas 2013년 11월 18일
i want each cluster differentiate different color
Walter Roberson
Walter Roberson 2013년 11월 18일
What should the three values be connected to? Should there be a different line for each "j", or should there just be one line total but the parts of it that come from different "j" should be in different colors?
Tomas
Tomas 2013년 11월 18일
each j different color

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Scatter Plots에 대해 자세히 알아보기

태그

질문:

2013년 11월 18일

댓글:

2013년 11월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by