How to Plot Smooth psuedo wigner Ville Distribution of multiple signals and save them each in a folder.
조회 수: 8 (최근 30일)
이전 댓글 표시
Hello Everyone!
I have a total of 89 ECG Signals, for which i have to do time frequency analysis means i have to find the smooth psuedo wigner ville distribution (SPWVD) of all 89 signals. I want to read each signal (one by one), plot their (SPWVD) and save that image into a folder. It means that there are a total of 89 images saved in a folder.
Actually, I am reading each signal, potting their time-frequency transform and then save that image in a folder which is taking too much time. I have also plotted Continous Wavelet Transform (CWT) of these 89 signals for which i uses CWTfilterBank (it loads all signals at once, computes CWT and saves each image to a folder), I cannot find this kind of ease in the former scenario. Can anybody please tell guide me how to find (SPWVD) of all 89 signals (at once or through a loop) and save them in a specific folder?
댓글 수: 0
채택된 답변
Bjorn Gustavsson
2021년 7월 21일
If you can do something like this:
ECG_files = dir('your-data-files.ECG'); % modify to read your data-files...
output_dir = 'WV-plots'; % modify to put this where it fits
mkdir(output_dir)
for iFiles = 1:numel(ECG_files)
curr_ECG = your_read_ECG_fcn(ECG_files(iFiles).name); % modify...
cWV = wvd(curr_ECG); % add additional inputs
your_WV_ecg_plot(cWV)
filename = sprintf('WV-ECG-%02d.png',iFiles);
filename = fullfile(output_dir,filename);
print('-dpng','-painters',filename)
end
Then it should run automatically.
HTH
댓글 수: 2
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Continuous Wavelet Transforms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!