How to sort my signal based on the frequency domain? low to high

조회 수: 1 (최근 30일)
CalebJones
CalebJones 2020년 1월 7일
댓글: CalebJones 2020년 2월 7일
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
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');
spectrogram.png
  댓글 수: 4
CalebJones
CalebJones 2020년 1월 9일
Your awesome.
Thank You
CalebJones
CalebJones 2020년 2월 7일
This approach was very helpful. And it has improved my research work by a big margin, however, is it possible to sort the entire feature space from low to high?
So that I can choose first 10 which is low freq and last 10 which is high freq.
What way the code can be tweaked to produce such an output?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by