How to find index of max or min in a vector (array)
data _null_;
/*data rc5;*/
/*set rc5 ; */
set rc5(obs=10);
array _i{5} rcseg1 -- rcseg5;
minperc=min(of _i[*]);
Pred_SEG=whichN(minperc,of _i[*]);
/*put rcseg1 -- rcseg5;*/
/*put (minperc pred_seg)(=/);*/
run;
Reference:
No comments:
Post a Comment