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

1 回表示 (過去 30 日間)
Mike Lynch
Mike Lynch 2020 年 8 月 5 日
編集済み: Mike Lynch 2020 年 8 月 8 日
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 Center および File ExchangeJust for fun についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by