How can we do the 50 % window overlapping?
    조회 수: 4 (최근 30일)
  
       이전 댓글 표시
    

Helow all, I have windowlength=5 and sample rate is 50HZ means 150 samples per window size. I did the code which overlaps values 149 out of 150 in two consecutive windows. Now, I want to overlap just 50% values means 75 samples.. I am pasting the code here and also showing a picture of the workspace of Matlab? Please help me in this regards
    frameIndex = find(newTime > (newTime(end) - windowLength...
                      - 2 / uniformSampleRate));
    lastFrame = frameIndex(1);    
    featureTraining = [];
   % overLap=(windowLength*50)/2;
    %using a sliding window to extract features of recorded data
    count=0;
    startIndex=1;
    for i = 1:lastFrame
        startIndex =i;
        t0 = newTime(startIndex);
        stopIndex = find(newTime > t0 + windowLength); %windowLength in instances
        stopIndex = stopIndex(1) - 1; % window stop index
        featureTraining(end+1,:) = extractFeatures(...
                                   newData(startIndex:stopIndex,:,:),...
                                   newTime(startIndex:stopIndex),...
                                   uniformSampleRate);
    end
end
end
댓글 수: 0
답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Printing and Saving에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!