2014-10-27 74 views
0

我有一个ECG信号和它的一些特殊点计算。更改剧情某些部分的LineWidth

enter image description here

我想有那些点(每一对)之间较厚线宽。我用刷子做了一个样本。

这里是我的变量,

signal % the ECG signal 
t  % time 
Q  % location of red points 
T  % location of yellow points 

这些对有四个在画面中可见,但也有更多的。

没有loop _ hold on有没有可能?

回答

1

你可以只用hold on,再次绘制感兴趣的区域中的数据:

% Some dummy data 
x = 0:0.01:10; 
y = sin(x); 
plot(x,y) 

% Data that we want emphasized 
% You can also select a subset of your existing data 
x_start = 2; 
x_end = 4; 
x_thick_line = x_start:0.01:x_end; 
y_thick_line = sin(x_thick_line); 

% Plot over the existing plot with thicker line 
hold on 
plot([x_start x_end],[y_thick_line(1) y_thick_line(end)],'ro',... 
     x_thick_line,y_thick_line,'Color','r','LineWidth',6') 

这使得在八度以下的结果,应该是相同的MATLAB:

enter image description here

+0

谢谢,其实我有很多很多! 4可以在图片中看到。我追踪了一些没有循环的情节。 – Rashid 2014-10-27 15:30:53

0

您应该绘制该功能三次(假设a..b的样式不同):

  • 0..a - 标准设置
  • a..b - 使用其他颜色/ line_width/...
  • b..end