Effacer les filtres
Effacer les filtres

convert signals to spectrogram

6 vues (au cours des 30 derniers jours)
mr de
mr de le 13 Déc 2021
Hi, I want to convert the existing signals to spectrogram images automatically and save them in jpg format, so how do I change the following code to execute the code correctly?
Thank you!
clc
clear all
close all
Path = 'IS\*.mat';
Files = dir(Path);
for i=1:length(Files)
fn = [Path(1:end-5) Files(i,1).name];
load(fn);
y = val(1:3600);
[thr,sorh,keepapp] = ddencmp('den','wv',y);
sig1 =wdencmp('gbl',y,'sym10',10,thr,sorh,keepapp);
fs=128;
pspectrum(sig1,fs,'spectrogram','TimeResolution',0.5)
title('pspectrum Signal')
temp=[num2str(i,'%04d')];
saveas(temp,'jpg');
end

Réponses (0)

Catégories

En savoir plus sur Time-Frequency Analysis dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by