I would like to plot periodogram for my voice file how to do that?

1 回表示 (過去 30 日間)
Yasir Ali
Yasir Ali 2019 年 4 月 10 日
コメント済み: Yasir Ali 2019 年 4 月 10 日
Hello Seniors and Experts, I would like to plot periodogram for my voice file can any one help me that how to plot it? I want to plot for 1000 samples at windows length of 256. I have a code kindly guide me is it good way or not if not kindly solve it.
[y,fs]=audioread('filename.wav');
n=0:256;
y=cos(pi/4*n)+ randn(size(n));
nfft=length(y);
periodogram(y,[],nfft)

回答 (1 件)

David Wilson
David Wilson 2019 年 4 月 10 日
編集済み: David Wilson 2019 年 4 月 10 日
You read in an audio file and set it to the variable y with sampling frequency fs, and then you immediately clobber it with a noisy sinusoid. Do you want to do that? I suspect not. Just delete lines 2 & 3 & re-run.
  1 件のコメント
Yasir Ali
Yasir Ali 2019 年 4 月 10 日
Yes I dont need Sinusoid noise, My wav file is five seconds I want to read periodogram for 0.5 seconds from that five seconds wav file how to plot that?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSimulation, Tuning, and Visualization についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by