How to plot WAV file
現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
古いコメントを表示
2 投票
Hello,
I'd like to plot .wav file in time and frequency domain.
採用された回答
Wayne King
2011 年 11 月 23 日
If this is the output of wavread, then see if you have two channels in y
[y,fs] = wavread(filename);
If y is two-channels, Nx2, then just plot one:
y = y(:,1);
dt = 1/fs;
t = 0:dt:(length(y)*dt)-dt;
plot(t,y); xlabel('Seconds'); ylabel('Amplitude');
figure
plot(psd(spectrum.periodogram,y,'Fs',fs,'NFFT',length(y)));
10 件のコメント
Wayne King
2011 年 11 月 23 日
so are these saved in a .wav file as two channels? one for the right ear and one for the left?
If so, then just do
yright = y(:,1);
yleft = y(:,2);
or however it is.
Daniel Shub
2011 年 11 月 24 日
@John, Pardon the yelling: THE MIT KEMAR HRTFS ARE NOT GIVEN FOR THE RIGHT AND LEFT EARS. Please read the documentation about how they recorded the HRTFS.
Maurel
2015 年 12 月 29 日
Hi !! thanks for your helpful post. I wonder if the unit is volt or mV ? Please can you confirm me that the unit of the amplitude axe is in Volt (or mV) ? thank !!
muhammad faiz
2017 年 12 月 4 日
hi sorry, but why it display "Undefined function or variable 'wavread'." after i run this coding "[y,fs] = wavread(filename);" ??
Florian Schüling
2018 年 1 月 25 日
try: [y,fs] = audioread ('Filename')
maithri kodakandla
2019 年 2 月 12 日
thank you :)
Natalie Phillips
2019 年 3 月 24 日
Hello Wayne King,
Could you explain the variables and why you put them in the format you did? If you can explain your code with comments that would be helpful.
Thank you,
Natalie
Eshaan Goyal
2020 年 10 月 7 日
what should be its xlabel and ylabel (for the graph which is plotted)
irtaza mazhar
2022 年 1 月 26 日
wht if channel is 1??
Anzzza
2022 年 2 月 9 日
when you have stereo audio, you got two channels. if you can, it's easier to work with one
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Pulsed Waveforms についてさらに検索
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
