MATLAB: How tho find the max value in a struct maxstructure Hi, I made a 1×1 struct with 5 fields. The struct consists of a column of fields and a column of values. How do I find the highest value? And if found, the field that belongs to this highest value? Best Answer [maxval, maxidx] = structfun(@max, YourStructure);fn = fieldnames(YourStructure);which_field_had_max = fn{maxidx}; Related SolutionsMATLAB: How to get the min/max value of all fields in a stucture out = min(structfun(@(x)min(x(:)),structure_1)); MATLAB: How tho get the corners of an unknown matrix It's really basic indexing:[x(1), x(1, end) x(end, 1) x(end) ] Related QuestionFinding min values in structure arrayHow to know if exist an field into a structFind max value of structureNeed to solve e^x=3*x in tho ways
Best Answer