How can I create threshold line red color?
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
nazmican
am 21 Dez. 2022
Kommentiert: nazmican
am 21 Dez. 2022
load('Vepdata3.mat');
hLen=length(h);
figure;
plot(EEGdata); %plot EEGdata
xlabel('time(s)');
ylabel('Amplitude(microA)');
hold on;
threshold=40;
thresholdLine=40; % Draw a horizontal line at y = 40;
plot(thresholdLine,'r-');
title('thresholdLine');
xlabel('time(s)');
ylabel('Amplitude(microA)');

1 Kommentar
Akzeptierte Antwort
Image Analyst
am 21 Dez. 2022
Bearbeitet: Image Analyst
am 21 Dez. 2022
Try yline
yline(threshold, 'Color', 'r', 'LineWidth', 2);
instead of what you have
thresholdLine=40; % Draw a horizontal line at y = 40;
plot(thresholdLine,'r-');
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!