How to write a for loop which will take in all .wav files in a directory, compute spectrogram and save as an image
조회 수: 4 (최근 30일)
이전 댓글 표시
I am new to Matlab from the Python domain, and am looking to write a short for loop which will take all .wav files ( I have many .wav files in a single folder for training data for a machine learning project). I want to iterate through each .wav file in the folder and produce a spectrogram and save each spectrogram to the folder with the same name as the original .wav file.
All files are the same length (3 seconds) and are all sampled at 500kHz.
This should be straight forward but I am struggling a bit as this is my first time on Matlab
댓글 수: 0
답변 (1개)
Mathieu NOE
2020년 10월 9일
hello
no panic ! I have the solution for you
the main function is : auto_process_all2.m
it needs the subfunction : spectrog_peak.m
it should be easy to you to modify your code - but I can continue to help you if needed
댓글 수: 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!