📄 comp_rdgt.m
字号:
function [cout]=comp_rdgt(cin,a)%COMP_RDGT Compute real DGT%M=size(cin,1);N=size(cin,2);W=size(cin,3);L=N*a;Mhalf=ceil(M/2);Mend=Mhalf*2-1;cout=zeros(M,N,W);% Copy the first coefficient, it is realcout(1,:,:)=real(cin(1,:,:));% Copy the cosine-part of the coefficients.cout(2:2:Mend,:,:)=real(cin(2:Mhalf,:,:))*sqrt(2);% Copy the sine-part of the coefficients.cout(3:2:Mend,:,:)=-imag(cin(2:Mhalf,:,:))*sqrt(2);% If M is even, we must also copy the Niquest-wave% (it is real)if mod(M,2)==0 cout(M,:,:)=real(cin(M/2+1,:,:));end;cout=reshape(cout,M*N,W);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -