I have a matlab struct that has a sub-element such that when I run
class(foo.bar)
Gives the error:
Error using class
The CLASS function must be called from a class constructor.
When I just run foo.bar, ans gets set several times.
How can I find out which class bar belongs to?