How to record audio using MATLAB?

I tried to record audio using microphone using the following code.
recObj=audiorecorder(8000,8,1);
disp('Start speaking.')
record(recObj,5);
disp('End of Recording.');
But the problem is while I run the program,MATLAB stops working and closes the program.I am using MATLAB 7. I also looked for the documentation for my version thinking if recording is no compatible for my version.But it is compatible. Can anyone help me with it?

Answers (0)

This question is closed.

Tags

Asked:

on 15 Oct 2017

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!