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

1 次查看(过去 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
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-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 个)

Community Treasure Hunt

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

Start Hunting!

Translated by