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!