📄 symbol.m
字号:
function H = symbol(varargin)
% SYMBOL -- convert matrix polynomial to symbol
%
% H = symbol(P,m,r)
% H = symbol(P)
%
% If P has type '', both M and R must be given.
% This routine attaches M, R and type 'symbol' to P
% and scales by 1/sqrt(m).
%
% If P has type 'polyphase', the coefficients get rearranged
% and scaled by 1/sqrt(m).
%
% If P has type 'symbol' already, nothing happens.
% Copyright (c) 2004 by Fritz Keinert (keinert@iastate.edu),
% Dept. of Mathematics, Iowa State University, Ames, IA 50011.
% This software may be freely used and distributed for non-commercial
% purposes, provided this copyright statement is preserved, and
% appropriate credit for its use is given.
%
% Last update: Feb 20, 2004
switch varargin{1}.type
case ''
% H = symbol(P,m,r)
if (nargin < 3)
error('m and r must be given');
end
m = varargin{2};
r = varargin{3};
H = varargin{1}/sqrt(m);
[n1,n2] = size(H);
if (n2 ~= r | round(n1/r)*r ~= n1)
error('size of P is not compatible with given r');
end
H.m = m;
H.r = r;
H.type = 'symbol';
case 'symbol'
H = varargin{1};
case 'polyphase'
H = varargin{1};
m = H.m;
r = H.r;
[n1,n2] = size(H);
H = reshape(H,n1,r);
H.type = 'symbol';
H.min = m * H.min;
H = trim(H/sqrt(m));
otherwise
disp('this should not happen');
keyboard
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -