新手求助,读取wav文件大小时出错。

我想输出一个wav音频文件的大小,
但是出现了问题,不知道怎么解决,
希望各位大佬帮忙看一下,感激不尽,下面是代码:
global file_name;
%guidata(hObject,handles)
file_name=uigetfile({'*.wav'},'Select an Audio File');
fileinfo = dir(file_name);%读取音频文件名
SIZE = fileinfo.bytes;%读取音频字节
Size = SIZE/1024;%转换为大小
出错的地方是
SIZE = fileinfo.bytes;%读取音频字节
提示:等号右侧的输出数目不足,不满足赋值要求。

 Accepted Answer

mgxmkt
mgxmkt on 21 May 2023

0 votes

你是想查看 文件的大小?
我以为是音频的长度
[file_name file_path]=uigetfile({'*.wav'},'Select an Audio File');
fileinfo=dir ([file_path '\' file_name]);

More Answers (0)

Tags

Asked:

on 21 May 2023

Answered:

on 21 May 2023

Community Treasure Hunt

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

Start Hunting!