Hi
I have a cell matrix consisting of 3 columns and 400 rows. Every entry in this matrix is a structure. Lets say three columns are A, B and C. Column A contains same structure StructureA, Column B contains same structure StructureB, Column C contains same structure StructureC in all rows. Let say StructureC contains 4 fields field1, field2, field3 and field4.
- I want to find max and min value of field3 across all rows in column C.
- Then I want to find out which row of ColumnC contains max value and which row contains min value of field3.
- Then I want to find out the average of field3 across all rows in ColumnC.
- Finally I want to get all the rows where field3 equals to some value, such as get all the rows where field3 = 'abc' in ColumnC.
I have already tried below code to calculate the max value but it did not work
maxField3 = max(Column3{:,3}.field3)
I don't want to use loop for calculating these things. Please help.
Thanks in advance.
Best Answer