Problem with AudioDataCollection function

4 ビュー (過去 30 日間)
Veton Kepuska
Veton Kepuska 2019 年 4 月 18 日
回答済み: Veton Kepuska 2019 年 4 月 22 日
I have created a MALTAB script called AudioDataCollection.m. This file executes perfectly.
However, whenver I transform this script into a function by setting
>>function AudioDataCollection(T)
I will get this error
>>
Undefined function or variable 'audioIn'.
Error in AudioDataCollection (line 36)
myx = audioIn();
<<
I have tryed many things unsucesfully. hence I need your help. Can you you help me:

回答 (1 件)

Veton Kepuska
Veton Kepuska 2019 年 4 月 22 日
I already solved this problem. It was undelcared function use, corrected by the foloiwng line of code:
audioIn = audioDeviceReader('SampleRate',fs, ...
'SamplesPerFrame',floor(fs/20));
Thanks
Veton

カテゴリ

Help Center および File ExchangeWaveform Design and Signal Synthesis についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by