フィルターのクリア

How to plot sound versus time?

2 ビュー (過去 30 日間)
Shubham Nishad
Shubham Nishad 2014 年 1 月 27 日
コメント済み: Shubham Nishad 2014 年 1 月 27 日
Hello, I recorded voice by using
record = wavrecord(5*44100,44100,1);
and then I want to plot the record vector versus time.so I did
t = 0:1/44100:5;
plot(t,record)
But I am getting error that record and t matrix size are not same and so matlab can't plot that graph. How to fix this issue?
Error Message: Error using plot Vectors must be the same lengths.

採用された回答

Wayne King
Wayne King 2014 年 1 月 27 日
You are defining t to run from 0 to 5 in increments of 1/44100, so it will contain 220501 elements (including 0)
Do this:
t = 0:1/44100:5-(1/44100);
plot(t,record)
  1 件のコメント
Shubham Nishad
Shubham Nishad 2014 年 1 月 27 日
Thank You buddy :)

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

その他の回答 (0 件)

カテゴリ

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