Hello,
Below is an excerpt from my code, in which I wish to linearly fix a baseline drift. The variable "QLBrainShift1" is simply the original signal.
AmtOfPts1 = iSO(3) - iSO(2); % Amount of points between SO 2 and 3
error1 = -QLBrainShift1(end); % scalar
for point1 = AmtOfPts1:-1:0 QLBrainShift1a = QLBrainShift1+error1-(point1/AmtOfPts1)*error1;endfigureplot(QTime(iSO(2):iSO(3)),QLBrainShift1a)
The plot that is being returned seems like QLBrainShift1a is being overwritten upon each loop. Therefore, only the last loop (point1=0) exits the "for" loop, and gets plotted. My intention is to create a new signal (QLBrainShift1a) according to the equation above with varying "point1" values, and plot all of the new signal on 1 graph. Any help is greatly appreciated.
Thanks, NH
Best Answer