Antworten (1)

KSSV
KSSV am 20 Apr. 2017

2 Stimmen

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 Kommentare

DSB
DSB am 20 Apr. 2017
Bearbeitet: DSB am 20 Apr. 2017
how can i upload my own audio in .mat file?
KSSV
KSSV am 20 Apr. 2017
[y,Fs] = audioread(filename); save demo.mat ;
Joseph Saxon
Joseph Saxon am 6 Mai 2020
Hey what is 'sig' in this thing? its not declared
Soulaimene Jaoua
Soulaimene Jaoua am 15 Feb. 2021
how can I save it as MP3 file
Shreyan Basu Ray
Shreyan Basu Ray am 5 Okt. 2021
@Soulaimene Jaoua change the extension from .wav to .mp3 by simply renaming the extension and then create the .mat file

Melden Sie sich an, um zu kommentieren.

Gefragt:

DSB
am 20 Apr. 2017

Community Treasure Hunt

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

Start Hunting!

Translated by