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

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

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Audio I/O and Waveform Generation dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!