How to filter structured array by several conditions
Afficher commentaires plus anciens
I have a structure array containing many fields such as size, perimeter, euler angles. I would like to filter this by calculations I have made to filter the euler angles within to having a misorientation angle (in euler space) of maximum 20 degrees to three different euler space points. I would then like to filter the entire structured array to only contain values which meet this condition.
For example,
if Data is the structured array, within this I have an array - Data.meanOrientation. Within this is Data.meanOrientation.phi, Data.meanOrientation.phi1, Data.meanOrientation.phi2. I would like to filter all of Data to only include the values which have the euler angles within 20 degrees of defined conditions.
For example, one condition is 0, 45 and 0 degrees for phi,phi1,phi2 and I want to select only Data which is within 20 degrees of these three. I then have another condition, but I want to select Data which corresponds to either the first and/or this second condition. I would then like to proceed with calculations on a DATA array which only corresponds to either of these conditions only while ignoring the rest of the data set which is not useful to me.
Any tips regarding which approach I should take would be most helpful.
Apologies if this is not clear, thank you for your time.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!