On 12/11/2012 8:34 AM, Debora wrote: > Il giorno martedì 11 dicembre 2012 14:44:30 UTC+1, Debora ha scritto: >> is there a way to find the maximum within a structure? > > i have the numbers and i want the max for this numbers >
Then just use max(). There is no difference if the numbers are inside a struct or outside. (Matlab would become very complicated if there was a different command to find maximum of numbers when they are inside a struct vs. outside).
EDU>> clear A EDU>> s=struct('my_numbers',rand(5,1)); EDU>> max(s.my_numbers)