Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
How to plot figure with following?
조회 수: 1 (최근 30일)
이전 댓글 표시
I plot a figure, suppose in that output is in between 0 to 50, I want that if output is greater than say 25 then that output points should in color, how to do that
댓글 수: 0
답변 (2개)
Azzi Abdelmalek
2016년 5월 12일
편집: Azzi Abdelmalek
2016년 5월 12일
% Example
x=0:0.1:10;
y=100*sin(x);
%----------------
idx=y>=25
scatter(x(idx),y(idx),'or');
hold on
scatter(x(~idx),y(~idx),'og');
댓글 수: 0
Mohamed Eljali
2016년 5월 12일
편집: Mohamed Eljali
2016년 5월 12일
% code
X1 = 0:50;
Y1 = 0:50;
figure(1)
stem(X1,Y1,'Marker','none','Color',[1 0 0]);
hold on
stem(X1(X1>25),Y1(Y1>25),'Marker','none','Color',[1 0 0]);
hold off
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!