selif.m

来自「计量工具箱」· M 代码 · 共 24 行

M
24
字号
function x=selif(y,cond);
% PURPOSE: select values of x for which cond is true
% -----------------------------------------------------
% USAGE: x = selif(y,cond)
%  where    y = input vector 
%        cond = a vector of 0,1 values  
% -----------------------------------------------------
% RETURNS: x = y(cond == 1)
% ----------------------------------------------------- 
% NOTE: a Gauss compatability function
% -----------------------------------------------------
% SEE ALSO: delif, indexcat

% written by:
% James P. LeSage, Dept of Economics
% University of Toledo
% 2801 W. Bancroft St,
% Toledo, OH 43606
% jpl@jpl.econ.utoledo.edu
       
% Select values of x for which cond is true
x=y(cond==1);
return;

⌨️ 快捷键说明

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