version (1.76 KB) by Alexander Mering
Find all fields within a struct (array) where the search pattern is found


Updated 10 Feb 2012

View License

Function to search for entries within a structure. This is done recursively, running through all elements of array-structures.


search_struct: structure to be searched, could also be array of struct

search_object: string, integer, cell, array or other thing to be searched for


structure_name: name of the structure to be searched. Used for full output of the structure content


FoundFields: Cell array of fields where the search object is found.

Cite As

Alexander Mering (2022). StructFind (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: structfind

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!