minval_pad.m
来自「spread spectrum communication will be he」· M 代码 · 共 19 行
M
19 行
function out=minval_pad(u)
mode=u(end); % mode is appended to data to determine if transform is real to complex, or complex to complex
L = length(u)-1;
out = u(1:L);
ym = abs(min(out));
if mode ==2
Lg = L/1.28; % number of good points for 2.56:1 oversampling
Lb = L-Lg; % number of tainted points in transition band(s)
% complex to complex xform
% replace each end with NaNs so no plot line is made, arghhh simulink does not handle NaN !
out((L/2-Lb/2):(L/2+Lb/2)) = ym; % can't use NaN, so minumum is next best choice
% so autoscaling does not get hosed
else
% real to complex
Lg = L/2.56; % number of good points for 2.56:1 oversampling
Lb = L/2-Lg; % number of tainted points in transition band(s)
out(Lg:L) = ym;
end;
%end;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?