Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
How to plot figure with following?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (2)
Azzi Abdelmalek
am 12 Mai 2016
Bearbeitet: Azzi Abdelmalek
am 12 Mai 2016
% 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 Kommentare
Mohamed Eljali
am 12 Mai 2016
Bearbeitet: Mohamed Eljali
am 12 Mai 2016
% 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 Kommentare
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!