⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cosmodu.m

📁 里面囊括了基于matlab滤波器设计的各种.m文件
💻 M
字号:
 
% [v,e,va0,va1,ea0,ea1] = cosmtrx(M,m)
%
% Select the value of M and m such that N=2*m*M.
% Then deliver the Cosine-Modulated Matrix C
% with the order M-by-2*M, v is the result of
% Cosine-Modulated Matrix of Vaidyanathan's
% Paper, e is the result of Cosine-Modulated
% Matrix of Malvar's Paper va0,va1,ea0 and ea1
% are half-block matrices of v and e respectively.
% This program is used to verify the property
% of Cosine-modulated  Matrix.
% The conclusion is the Eq.(17)(18)(19) are
% satisfied in [1]. But in the correspondent
% property of e matrix there is no such factor
% that -1 to the minus m-1 power. It is due 
% to the absence of m in e(k,l).

function [v,e,va0,va1,ea0,ea1] = cosmtrx(M,m)
N = 2*m*M;
% produce the elements of the C matrix
for k = 1:M
 for l = 1:2*M
  v(k,l) = 
2*cos((2*(k-1)+1)*(pi/(2*M))*((l-1)-(N-1)/2)+(pi/4)*(-1)^(k-1));
 end
end
for k = 1:M
 for l = 1:2*M
  e(k,l) = 2*cos((pi/(2*M))*(2*(k-1)+1)*((l-1)+(M+1)/2));
 end
end

% produce the a0 and a1 respectively
for k = 1:M
 for l = 1:M
  va0(k,l) = v(k,l);
 end
end
for k = 1:M
 for l = M+1:2*M
  va1(k,l-M) = v(k,l);
 end
end
for k = 1:M
 for l = 1:M
  ea0(k,l) = e(k,l);
 end
end
for k = 1:M
 for l = M+1:2*M
  ea1(k,l-M) = e(k,l);
 end
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -