How can I apply filer for three signal using matlab
조회 수: 1 (최근 30일)
이전 댓글 표시
[tm,signal1,Fs,labels]=rdmat('emg_healthy44m');
[tm,signal2,Fs,labels]=rdmat('emg_myopathy57m');
[tm,signal3,Fs,labels]=rdmat('emg_neuropathy62m');
I haver read three signals .Now I would like to apply filetring on the tree signals at a time using for Loop
댓글 수: 0
답변 (1개)
Star Strider
2022년 8월 4일
If they all have the same sampling frequency and are the same lengths and the same filtering requirements, concatenate them as column vectors and filter them at the same time using filtfilt or bandpass (for example) or its friends:
signals = [signal1(:) signal2(:) signal3(:)];
signals_filt = bandpass(signals, [f_low f_high], Fs);
simialrly:
signals_filt = filtfilt(sos,g,signals);
No loops are necessary.
If they are not the same lengths or have different filters or other characteristics, then it will be necessary to ‘brute force’ the filtering:
signal1_filt = bandpass(signal1, [f_low1 f_high1], Fs1);
signal2_filt = bandpass(signal2, [f_low2 f_high2], Fs2);
signal3_filt = bandpass(signal3, [f_low3 f_high3], Fs3);
In this instance, a loop is likely not the most efficient option.
.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!