uiopen vs audioread, is there an advantage to one over the other for .wav files?

1 次查看(过去 30 天)
I am working with .wav files for acoustics. I find it easier to just drag and drop my .wav files at the command line in MATLAB, and MATLAB loads them automajically without me typing commands, using uiopen.
As I understand it, MATLAB recognises the .wav extension and loads the file with audioread, so this is no different from typing at the command line. Is this correct? Is there any advantage to using audioread vs uiopen?
Thanks.

回答(1 个)

Jan
Jan 2020-8-5
The function uiopen and audioread have two different jobs. While the first opens Matlab files with the apropriate application, the seconds imports a WAV file. I do not see how both are related to a drag&drop of a wav file to the command window.
Using the command windows as drag&drop target is an indirect method and not the purpose of this GUI. So please explain, what you want to achieve and why you prefer this idea.
  1 个评论
Mike Lynch
Mike Lynch 2020-8-6
编辑:Mike Lynch 2020-8-8
When I drag and drop a wav file on the command line, the following appears:
uiopen('D:\Bat calls\files\EchoMeter\Recordings\Session_20200108_183053\LASBOR_20200108_183330.wav',1)
So clearly MATLAB uses uiopen in this case.
In my workspace I get a data file with my audio data and a variable fs with my data sample rate. This appears to be the same as if I use audioread and type in the path and filename.
It is easier and faster to just drag and drop my files, rather than type in the command line, so if the result is the same I will continue to drag and drop.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Just for fun 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by