plot the first sample with different color
조회 수: 1 (최근 30일)
이전 댓글 표시
hello every body. i have a function called Fun which i want to plot the result. i wrote the line below and the result is attached.
now, i want to show the first sample in different color. for example the first sample in green and from the second to the end be red,
could anyone help me please?
plot(Fun(:,1)Fun(:,2),'.r-')
댓글 수: 1
채택된 답변
Adam Danz
2019년 11월 4일
편집: Adam Danz
2019년 11월 4일
plot(Fun(:,1)Fun(:,2),'.r-')
hold on
plot(Fun(1,1)Fun(1,2),'.g') % if you want the first coordinate
% -OR-
plot(Fun(1:2,1)Fun(1:2,2),'.g-') % if you want the first segment
BTW, I'm guessing that Fun is just an example function name and that the real function name is more descriptive and unique.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spectral Measurements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!