How to sort my signal based on the frequency domain? low to high
조회 수: 4 (최근 30일)
이전 댓글 표시
So i have 100 features from R-ICA. Some of the signals are very high frequency and a few, say 11 out of 100 are low frequency.
Is there a way to rank the signals based on the frequency domain.
I have attched a matfile with 100 features obtained from ICA.
173 is my activity window.
Each task is 173 seconds long and 100 is the ICA features.
채택된 답변
Meg Noah
2020년 1월 9일
편집: Meg Noah
2020년 1월 9일
Here's a suggestion for enhancing the spectogram to pull out signals. More information about the feature signals would be helpful for extracting the energy at each timestep.
load('matlab.mat');
ICA_weights_right(ICA_weights_right<0) = 0;
t_s = 1:173;
f = 1:100;
% find the timesteps that have a strong signal - zero out the ones that do
% not have a strong signal
maskSpectrogram = ICA_weights_right;
zerolength = 20;
for ifeature = 1:100
tmp = zeros(173,1);
tmp(ICA_weights_right(:,ifeature)==0) = 1;
tmpLabeled = bwlabel(tmp);
stats = regionprops(tmpLabeled,'Area');
idx = find([stats.Area] > zerolength);
for k = 1:length(idx)
maskSpectrogram(tmpLabeled == idx(k),ifeature) = 1;
end
tmp = zeros(173,1);
tmp(ICA_weights_right(:,ifeature)>0) = 1;
tmpLabeled = bwlabel(tmp);
stats = regionprops(tmpLabeled,'Area');
idx = find([stats.Area] > zerolength);
for k = 1:length(idx)
maskSpectrogram(tmpLabeled == idx(k),ifeature) = 1;
end
end
newSpectrogram = ICA_weights_right.*maskSpectrogram;
mask5x1 = ones(5,1);
newSpectrogram = imopen(newSpectrogram,mask5x1);
ICA_weights_right = ICA_weights_right'
newSpectrogram = newSpectrogram'
figure('color','white');
subplot(2,1,1)
imagesc(t_s,f,ICA_weights_right);
xlabel('time [s]');
ylabel('feature (frequency) index');
set(gca,'ydir','normal');
set(gca,'fontweight','bold','fontsize',14);
title('Spectrogram');
subplot(2,1,2)
imagesc(t_s,f,newSpectrogram);
xlabel('time [s]');
ylabel('feature (frequency) index');
set(gca,'ydir','normal');
set(gca,'fontweight','bold','fontsize',14);
title('Post-Processed Spectrogram');
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spectral Measurements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!