2014-10-27 34 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