📄 minval_pad.m
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -