필터 지우기
필터 지우기

How to replace a character in matlab

조회 수: 2 (최근 30일)
Stina Ravdna Lorås
Stina Ravdna Lorås 2020년 11월 2일
댓글: Stina Ravdna Lorås 2020년 11월 4일
I want to use the string v in the audiofile name etc in the code below (all the v's). Tried with num2str() but that works probably just for numbers?
vocals=["a"; "e"; "i"; "o"; "u"; "y"; "ae"; "oe"; "aa"];
for i=1:9
v=vocals(i)
[v, Fs] = audioread('v.wav');
v_filter=lpc(v, 9);
end;

채택된 답변

Stephen23
Stephen23 2020년 11월 2일
편집: Stephen23 2020년 11월 2일
vocals = ["a"; "e"; "i"; "o"; "u"; "y"; "ae"; "oe"; "aa"];
for k = 1:numel(vocals)
fnm = sprintf('%s.wav',vocals(k));
[v, Fs] = audioread(fnm);
v_filter = lpc(v,9);
end
  댓글 수: 3
Stephen23
Stephen23 2020년 11월 4일
@Stina Ravdna Lorås : please accept my answer if it helped you!
Stina Ravdna Lorås
Stina Ravdna Lorås 2020년 11월 4일
I'm sorry, I didnt realize I had to. Now it is accepted :) Thank you again :)
Stina

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by