フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to plot figure with following?

1 回表示 (過去 30 日間)
Ram k
Ram k 2016 年 5 月 12 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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

回答 (2 件)

Azzi Abdelmalek
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');

Mohamed Eljali
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

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by