small20.m
来自「ipr函数库与仿真实验程序,都是要用到的库函数。」· M 代码 · 共 20 行
M
20 行
function Y = small20(X,small)% Zeros out small numbers in an array.%Inputs: X - an array with some small elements that% are to be replaced by zero% small - max absolute value of numbers to be % set to zero%Output: Y - X array with small elements set to zero%%%%%%%%%%%%%%%%%% small20.m %%%%%%%%%%%%%%%%%%%%% Discrete-Time Control Problems using %% MATLAB and the Control System Toolbox %% by J.H. Chow, D.K. Frederick, & N.W. Chbat %% Brooks/Cole Publishing Company %% September 2002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Y = X;vec = find(abs(X) <= abs(small) & X ~= 0);Y(vec) = 0*vec;%%%%%%%%%%
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?