input Variable storage audio file

9 ビュー (過去 30 日間)
Jonhoi Clarke
Jonhoi Clarke 2020 年 4 月 14 日
回答済み: Star Strider 2020 年 4 月 14 日
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 Center および File ExchangeAudio 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