Filter löschen
Filter löschen

Plot xx mark after a threshold

1 Ansicht (letzte 30 Tage)
Tino
Tino am 11 Aug. 2020
Beantwortet: Walter Roberson am 11 Aug. 2020
Hello
I have univariate variables (ojoru) and I want the matlab plot to shows xxxxx above the set threshold on the y axis
Please find my code below but there is an issue with it
y=ojoru;
n=length(ojoru);
x=zeros(1,n);
for k=1:n
if y(k) > 3
c = 'r*';
else
c = 'b';
end
end
disp (plot(y, c));
hold on
I will appreciate it If I get a solution for this

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 11 Aug. 2020
Draw the complete data once with 'b'. Then "hold on". Then draw the same data again with 'r*' and with
'MarkerIndices', find(y>3)

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by