필터 지우기
필터 지우기

How I can i read all files in a folder

조회 수: 1 (최근 30일)
Alejandro Diez
Alejandro Diez 2019년 1월 30일
편집: Ollie A 2019년 1월 30일
I have a folder with files named like this: "speaker1_001.wav". From 001 to 020. How can I do a for loop to audioread all the files and storing the value in variables with different names?

답변 (1개)

Ollie A
Ollie A 2019년 1월 30일
편집: Ollie A 2019년 1월 30일
You can use sprintf().
for n = 1:20
filename = sprintf('speaker1_%03d.wav', n)
end
Then within the loop input filename into your function that reads in audio.

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by