필터 지우기
필터 지우기

1D dct equation implementation

조회 수: 2 (최근 30일)
Urmila
Urmila 2014년 4월 6일
i have written a code to implent 1D dct formula. but the results are not matching with result of inbuilt function 'dct' for the same input data. can anyone help me to solve the problem.here is the code
clc;
pi=3.14;
arr=[8 8 8 8 8 8 8 8];
for k=1:8
temp=0;
DCT(k)=0;
for i=1:8
if k==1
c=1/sqrt(8);
else
c=sqrt(2/8);
temp=temp+(arr(i)*cos((2*i+1)*k*(pi)/16));
end
end
DCT(k)=c*temp;
display(DCT(k))
end

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by