function [sm,gr,av] = minmax (a)
                                         
sm  = [min(a) find(a==min(a))]' ;
gr  = [max(a) find(a==max(a))]' ;
av  = mean(a) ;
