comp_rdgt.m

来自「linear time-frequency toolbox」· M 代码 · 共 30 行

M
30
字号
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 + =
减小字号Ctrl + -
显示快捷键?