Filter löschen
Filter löschen

convert signals to spectrogram

1 Ansicht (letzte 30 Tage)
mr de
mr de am 13 Dez. 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

Antworten (0)

Kategorien

Mehr zu Time-Frequency Analysis finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by