How can I create threshold line red color?
7 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Image Analyst
2022-12-21
编辑:Image Analyst
2022-12-21
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-');
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!