필터 지우기
필터 지우기

How to find the sliding RMS of a signal by sliding a window one unit at a time along a signal?

조회 수: 2 (최근 30일)
I have codes to calculate the RMS for each window. But one window starts at the end of the previous window. I am new to MATLAB and I am struggling to modify the for loop such that the window slides along the time axis.
The data is in the form of an excel document with 2 columns that I read using the first few lines in my code.
if true
clear all;
Array=csvread('Pencilbreak-63dB.csv');
col1 = Array(:, 1);
col2 = Array(:, 2);
window = 100;
for i=1:window:length(col1)
RMS(i:i+window-1) = (sum(col2(i:i+window-1).^2)/window)^0.5;
end
plot(col1,RMS)
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by