MATLAB: How to find the maximum length in a structure of vectors arraycelllengthmaximumstructstructures I have a struct, fem. One of its field is a cell (fem.Element) and I want to find the maximum length of fem.Element. Thanks in advance, André Best Answer I solved using this: max(cellfun(@length,fem.Element); Related SolutionsMATLAB: Optimise for loop in using cell array lengthboundaries = cellfun(@length,boundaries); MATLAB: Converting Cell to Matrix to use Max Function MYCELL = {magic(3) magic(5) magic(6)}mx = cellfun(@(x) max(x(:)),MYCELL)mx has the maximum element for each individual cell. If you need the overall maximum, use MAX on mx. Related QuestionHow to extract the max items in structHow to get the min/max value of all fields in a stuctureHow to normalize the data set of 3 groups and 50 images (3X50) and for each image9 features have been calculatedFind the size of a structured arrayCell to double with mismatched dimensionsHow tho find the max value in a struct
Best Answer