필터 지우기
필터 지우기

convert signals to spectrogram

조회 수: 6 (최근 30일)
mr de
mr de 2021년 12월 13일
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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Time-Frequency Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by