input Variable storage audio file

9 次查看(过去 30 天)
I would like to store the audio file in the "input_Signal so it can be modulated . any ideas ?
load gong;
[y,Fs]=audioread('gong.wav');
Input_Signal=
%
beginFreq = 1000 / (Fs/2);
endFreq = 4000 / (Fs/2);
[b,a] = butter(Order, [beginFreq, endFreq], 'bandpass');
% Bandpass
Signal = filter(b, a, Input_Signal);

采纳的回答

Star Strider
Star Strider 2020-4-14
Starting with:
v = load('gong.mat');
audiowrite('gong.wav',v.y,v.Fs);
I would do either:
[y,Fs]=audioread('gong.wav');
Input_Signal = y;
or:
[Input_Signal,Fs]=audioread('gong.wav');
Both of these should work.
With respect to the rest, see the buttord and filtfilt function documentation for some valuable hints on how to filter a signal correctly.
.

更多回答(0 个)

类别

Help CenterFile 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!

Translated by