필터 지우기
필터 지우기

How can I write a function about upsampling in DSP

조회 수: 1 (최근 30일)
Ahmet SENGEZ
Ahmet SENGEZ 2014년 6월 28일
답변: Daniel kiracofe 2014년 6월 28일
I have an recorded speech signal(.wav) with 8kHZ and 8bits.I want to upsample the signal by 2,and then pass the upsampled signal through a LP filter with having cut-off frequency 4kHz.

답변 (1개)

Daniel kiracofe
Daniel kiracofe 2014년 6월 28일
resample() work might for you to upsample the data.
Filtering in matlab is a two step process. First, you have to design the filter that you want to use. Then, you use the filter on your data. Assuming your sampling frequency is in the variable Fs, and your desired cutoff frequency is Fc, then the most simple filter command would be these two lines:
[b,a] = butter(1, Fc/Fs); filtered_data = filter(b,a,data);
The variables b and a represent the coefficients of the filter in transfer function format. You can basically ignore those.

카테고리

Help CenterFile Exchange에서 Signal Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by