?? dct1mtx.m
字號:
% C = dct1mtx(M)
% Provide the type I discrete cosine
% transform matrix
%
function C = dct1mtx(M);
for I = 1:M+1
for L = 1:M+1
C(I,L)=sqrt(2/M)*cos((pi/M)*(L-1)*(I-1));
end
end
D(1,1)=0.5;
D(1,M+1)=0.5;
D(M+1,1)=0.5;
D(M+1,M+1)=0.5;
x = 1/sqrt(2);
D(2:M,2:M)=ones(M-1,M-1);
D(1,2:M)=x*ones(1,M-1);
D(2:M,1)=x*ones(M-1,1);
D(M+1,2:M)=x*ones(1,M-1);
D(2:M,M+1)=x*ones(M-1,1);
C=D.*C;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -