Finding the maximum in a list



You can also do apply(max,list);
Dan
Neilen Marais wrote:

>Hi
>
>I'm trying to find the largest item in a list. I.e. [5,3,7,2] -> 7.
>
>It seems the max() routine doesn't work on lists, but expects you to
>pass
>the items in individually.  Is 
>
>lreduce(max, [5,3,7,2]);
>
>the best way to achieve this?
>
>Thanks
>Neilen
>
>  
>