function x=selif(y,cond); %indexcat Select values of x for which cond is true x=x(cond==1); return;