Concatenated Segmentation using Overlapping Windows

조회 수: 16 (최근 30일)
Tanumaya Bhowmik
Tanumaya Bhowmik 2021년 2월 10일
답변: Mathieu NOE 2021년 2월 10일
I have a N-dimensional timeseries data with m samples (Nxm). I would like to sample the table with a fixed sized window of 50 samples with a shift of 5 samples, concatanating each sample in another table. What is an efficient algorithm to run this process?
  댓글 수: 1
KALYAN ACHARJYA
KALYAN ACHARJYA 2021년 2월 10일
Can you explain with numeric data, considering any sample 1D array data?

댓글을 달려면 로그인하십시오.

답변 (1개)

Mathieu NOE
Mathieu NOE 2021년 2월 10일
hello
example below :
% dummy data
data = rand(80,5);
shift = 5; % nb of samples for averaging
buffer = 50; % nb of samples for averaging
for ci=1:fix((length(data)-buffer)/shift +1)
start_index = 1+(ci-1)*shift;
stop_index = min(start_index+ buffer,length(data));
out_data{ci} =data(start_index:stop_index,:); %
figure(ci),
plot(out_data{ci});
end

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by