How to sort my signal based on the frequency domain? low to high
4 views (last 30 days)
Show older comments
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.
Accepted Answer
Meg Noah
on 9 Jan 2020
Edited: Meg Noah
on 9 Jan 2020
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');
4 Comments
More Answers (0)
See Also
Categories
Find more on Spectral Measurements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!