How do I convert a piece of music in .mp3 format to a .mat format?

Asked by Juan Hidalgo about 8 hours ago
Latest activity Commented on by Juan Hidalgo about 8 hours ago

I'm building an app using the guide function in matlab and would like to include a music file as part of my app. I know that one way to do this is to use a .mat file, how do I convert an .mp3 file to a .mat file? or is there a better way to include an audio file into a GUI?

0 Comments

Juan Hidalgo

Products

No products are associated with this question.

1 Answer

Answer by Azzi Abdelmalek about 8 hours ago
Edited by Azzi Abdelmalek about 8 hours ago

Use audioread function

[y,fs]=audioread('youfile.mp3');
save new_file y fs

% to listen to the music type

sound(y,fs)

1 Comment

Juan Hidalgo about 8 hours ago

when I try to use the audioread function matlab says it cant find the function.

Azzi Abdelmalek

Contact us