How to compute mean value of a field in a struct?
Hi everyone, writing here since I can’t find the solution to a problem I’m encountering. I need to compute the mean of some fields in a struct I created (see the file attached), but I can’t directly access this fields. It is a 1×31 struct. Each cell of the struct contains 3 fields (Azimuth, Colatitude, W) which are struct arrays. I’d need to compute the mean value of some of these fields cells since I need only 1 value for each cell but some contain more than one. For example, I wanted to compute mean(features{1}.azimuth(7)) but it says that the dot indexing is not supported for the struct. Hope you can help me, I know it is quite a complex structure! You’ll find the .mat attachedHi everyone, writing here since I can’t find the solution to a problem I’m encountering. I need to compute the mean of some fields in a struct I created (see the file attached), but I can’t directly access this fields. It is a 1×31 struct. Each cell of the struct contains 3 fields (Azimuth, Colatitude, W) which are struct arrays. I’d need to compute the mean value of some of these fields cells since I need only 1 value for each cell but some contain more than one. For example, I wanted to compute mean(features{1}.azimuth(7)) but it says that the dot indexing is not supported for the struct. Hope you can help me, I know it is quite a complex structure! You’ll find the .mat attached Hi everyone, writing here since I can’t find the solution to a problem I’m encountering. I need to compute the mean of some fields in a struct I created (see the file attached), but I can’t directly access this fields. It is a 1×31 struct. Each cell of the struct contains 3 fields (Azimuth, Colatitude, W) which are struct arrays. I’d need to compute the mean value of some of these fields cells since I need only 1 value for each cell but some contain more than one. For example, I wanted to compute mean(features{1}.azimuth(7)) but it says that the dot indexing is not supported for the struct. Hope you can help me, I know it is quite a complex structure! You’ll find the .mat attached struct, mean MATLAB Answers — New Questions