Clear Filters
Clear Filters

音声データのmatファイル変換について

8 views (last 30 days)
Yusaku Ando
Yusaku Ando on 1 May 2017
Edited: michio on 5 Jul 2018
pcmファイルの録音データを短時間に区切った0.5秒ほどの変数データをワークスペース上にmatファイルで作成しました。matファイルをwavファイルに変換したいのですが以下のようにプログラムしたところ『関数または変数 'y' が未定義です。』とエラーが表示されるのはなぜでしょうか。
load('data.mat')
filename = 'data.wav';
audiowrite(filename,y,Fs);
  3 Comments
Jiro Doke
Jiro Doke on 9 May 2017
このエラーはよくあるエラーの一つですね。エラーの意味と原因の可能性を理解しておくと良いでしょう。
Kojiroさんも書かれましたが、 load('data.mat') で読み込まれた変数名を確認することをお勧めします。
参考:MATLAB の基本操作法はここから。
Yusaku Ando
Yusaku Ando on 9 May 2017
ご指摘いただいた通り変数がy,Fsになっていませんでした。 変更したところ実行できました。 ありがとうございます。

Sign in to comment.

Answers (0)

Categories

Find more on Audio I/O and Waveform Generation in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!