How to save audio in .mat file
조회 수: 13 (최근 30일)
이전 댓글 표시
Hi I'm a beginner in matlab and i want to save audio in .mat file how can i do that?
댓글 수: 0
답변 (1개)
KSSV
2017년 4월 20일
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
Shreyan Basu Ray
2021년 10월 5일
@Soulaimene Jaoua change the extension from .wav to .mp3 by simply renaming the extension and then create the .mat file
참고 항목
카테고리
Help Center 및 File Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!