How to save audio in .mat file
Afficher commentaires plus anciens
Hi I'm a beginner in matlab and i want to save audio in .mat file how can i do that?
Réponses (1)
KSSV
le 20 Avr 2017
y = rand(10000,1) ; % some random signal
Fs = 1100 ; % som frequency
save demo.mat ; % save the data into .mat file
clear y Fs % remove the variables
load demo.mat ;
filename = 'handel.wav';
audiowrite(filename,y,Fs);
[y,Fs] = audioread('handel.wav');
sound(y,Fs);
% clear sound
5 commentaires
KSSV
le 20 Avr 2017
[y,Fs] = audioread(filename); save demo.mat ;
Joseph Saxon
le 6 Mai 2020
Hey what is 'sig' in this thing? its not declared
Soulaimene Jaoua
le 15 Fév 2021
how can I save it as MP3 file
Shreyan Basu Ray
le 5 Oct 2021
@Soulaimene Jaoua change the extension from .wav to .mp3 by simply renaming the extension and then create the .mat file
Catégories
En savoir plus sur Audio and Video Data dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!