How to Plot multicolor Vector
이전 댓글 표시
Hello,
I have a line code which is:
plot(Srn(:,1),'*g')
the vector Srn has 178 elements. How can I plot the range 1-59 in red, 60-131 in black and 132-178 in blue?
Thanks
답변 (1개)
the cyclist
2013년 6월 26일
Here's one way:
figure
hold on
plot(Srn(1:59,1),'*r')
plot(Srn(60:131,1),'*k')
plot(Srn(132:178,1),'*b')
댓글 수: 2
Wellinton
2013년 6월 27일
the cyclist
2013년 6월 27일
If you found that my answer solved your question, you may want to officially accept it, which will help people looking for similar solutions in the future.
카테고리
도움말 센터 및 File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!