フィルターのクリア

What is the x axis and y axis if i plot(y) that y = audioread(​'filename.​wav') ?

10 ビュー (過去 30 日間)
HS Kim
HS Kim 2016 年 11 月 14 日
コメント済み: Star Strider 2016 年 11 月 18 日
I have to make equilizer as my project
So i read wav file by audioread
And i have to adjust x axis as frequency and y asix as sound pressure(db is right but it is hard to make to me)
for equilizer project.
But i don't know about axises.
I heared that y axis of plot(y) is sound pressure is it right?
And what is x axis?
help me
Thank you

採用された回答

Star Strider
Star Strider 2016 年 11 月 14 日
The output of audioread for floating-point data is normalised to be between -1 and +1. Unless you have additional information about the mapping of the original data to the -1<=y<=+1 you will not be able to recover the original units.
You have to create your own x-axis (actually, time). Do that using Fs (the sampling frequency) as:
t = linspace(0, 1, size(y,1))'/Fs;
Remember that ‘y’ is a (Nx2) matrix (two channels, left channel is ‘y(:,1)’, right channel is ‘y(:,2)’).
  2 件のコメント
HS Kim
HS Kim 2016 年 11 月 18 日
Thanks really helpful!
Star Strider
Star Strider 2016 年 11 月 18 日
My pleasure!

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

その他の回答 (1 件)

Jan
Jan 2016 年 11 月 14 日
y = audioread('filename.wav');
plot(y)
Now the X-axis is the sample index. You need at least the sampling frequency to get real time:
[y, fs] = audioread('filename.wav');
t = (0:length(y)) / fs;
plot(t, y);
The values of y are the signal as values between -1 and +1.

カテゴリ

Help Center および File ExchangeAudio and Video Data についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by