How can I normalize the baseline of a displacement?
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello all,
I am working on the analysis of multiple displacement trials (fig.). In order to perform the analysis, I need to normalize the trace, so that all the trials baseline start from 0. Of course I need to shift the displacement according to the shift of the baseline.
Thank you very much!
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/159758/image.jpeg)
댓글 수: 0
채택된 답변
Image Analyst
2016년 4월 1일
I'd first identify the spike locations, then interpolate the baseline from what's not a spike. Then I'd subtract that from the original signal. Something like (untested)
% Find spikes.
spikeIndexes = signal > 10;
Extract non-spikes
baseLine = signal(spikeLocations);
% Get continuous x
x = 1 : length(signal);
% Interpolate everywhere
baseline = interp1(x(spikeIndexes), baseline, x);
% Subtract
correctedSignal = signal - baseline;
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Electrophysiology에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!