How do i read audio and include it in my function?
1 回表示 (過去 30 日間)
古いコメントを表示
i need to plot a graph that shows
y=y1+1×r(t)
𝑦1=sin(2𝜋𝑓𝑡+𝜋/4)
r(t): read from audio file
but my problem is i don't know include the r(t) into my program.
the program i know so far is
fs=1000;
t=0:1/fs:1;
f=440;
y=y1+1*rt
y1=sin(2*pi*f*t+pi/4);
sound(y,fs)
N=1+0.1*fs;
n=1:N;
plot(t(n),y(n))
xlabel('Time(s)')
ylabel('Amplitude')
0 件のコメント
回答 (1 件)
Nora Khaled
2020 年 11 月 20 日
check out this function
it reads data from the file named filename, and returns sampled data, y, and a sample rate for that data, Fs.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Audio I/O and Waveform Generation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!