필터 지우기
필터 지우기

changing audio frequency to a constant

조회 수: 1 (최근 30일)
Mohamed Turkmani
Mohamed Turkmani 2022년 8월 19일
댓글: Chunru 2022년 8월 19일
lets say i have an audio that has so many different frequencies, can i modify its frequency to constant and run it at 2000 hz for example?
  댓글 수: 2
GandaBerunda
GandaBerunda 2022년 8월 19일
By frequency do you mean sampling frequency?
Mohamed Turkmani
Mohamed Turkmani 2022년 8월 19일
편집: Mohamed Turkmani 2022년 8월 19일
no i know how to change sampling frequency, i mean the actual frequency, is there a chance to change it or mix it with like a 2000 hz sine tone

댓글을 달려면 로그인하십시오.

채택된 답변

Chunru
Chunru 2022년 8월 19일
load handel.mat
[p, q] = rat(2000/Fs)
p = 125
q = 512
y2000 = resample(y, p, q);
whos
Name Size Bytes Class Attributes Fs 1x1 8 double cmdout 1x33 66 char p 1x1 8 double q 1x1 8 double y 73113x1 584904 double y2000 17850x1 142800 double
  댓글 수: 2
Mohamed Turkmani
Mohamed Turkmani 2022년 8월 19일
can you explain the code please
Chunru
Chunru 2022년 8월 19일
load handel.mat % load a sample data with Fs
[p, q] = rat(2000/Fs) % find a rational fraction of desired Fs and orighinal Fs
% p, q are integers so that resample can be efficiently implemented
y2000 = resample(y, p, q); % resample the data so that FsNew = p/q*Fs

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by