Decimate every row in a matrix
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
I have an array 26X10600 and have successfully managed to decimate the data to the required factor, however the decimate function only applies this to the first row in the array.
Is there a way to apply the decimate function to all the rows in the array? Perhaps using a loop?
Thanks in advance,
Ed.
0 comentarios
Respuestas (1)
Chunru
el 14 de Sept. de 2022
% assume that decimate is used for downsampling
a = randn(100, 26); % time is along the column
[ns, nch] = size(a);
r = 5;
ns_down = floor(ns/r);
a_down = zeros(ns_down, nch);
for i=1:nch
a_down(:, i) = decimate(a(:, i), r);
end
% if you use resample
a_down = resample(a, 1, 5)
0 comentarios
Ver también
Categorías
Más información sobre Multirate Signal Processing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!