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 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