How to signal divide into windows of lengths [1024] .
5 次查看(过去 30 天)
显示 更早的评论
I have a signal x which is 43939 , which I want to divide into windows of lengths [1024] where each window overlaps with 50% of the previous window.using 1024 as an example I want the whole signal to be divided to windows of length 1024 where each window overlaps with the previous by 50% like 1:1024 then 512:1536 and store each window how can I implement that using a for loop or if statement then how to I use discrete wavelet transform (DWT) for the signal decomposion to 10 levels
0 个评论
回答(2 个)
Dave B
2021-11-16
How about assembling up a matrix marking the indices of x you want. Of course you'll have to do something so that it's divisible by 512 (like pad the end).
x=rand(1,43939);
% pad at the end?
x=padarray(x,[0 512-mod(numel(x),512)],nan,'post');
start=(1:512:numel(x)-512)';
ind=start+(0:1023);
% just a view of what this looks like:
ind(1:3,1:5)
ind(1:3,end-5:end)
y = x(ind);
Star Strider
2021-11-16
signal = 1:100;
winlen = 10; % WindowLength
overlap = fix(winlen/2); % 50% Overlap
out = buffer(signal, winlen, overlap)
The wavelet decomposition then depends in part on the sort of wavelet that will give the best results for the intended decomposition. I have not used wavelets frequently enought to consider myself skilled in their use, so I do not feel comfortable commenting on that part.
.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Discrete Multiresolution Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!