Reputation: 41
Is it possible to see the structure of my struct variables while I'm programming?
I'm programming in matlab gui. I store my variables in the struct variable "handles". When I want to know how i structured the variable I have to run my programm and stop it while running to look up the structure of my variables.
Is it possible, that if I type in my code "handles" that I see a list of all containing variables (and other struct variables)?
(I know that from Visual Studio)
Upvotes: 2
Views: 54
Reputation: 7028
Matlab Structure
type is a dynamic type - fields/members of the variables of this type can change during run-time. There is no trivial way to know before the execution of a program all the fields/members that certain Structure
instance (variable) will contain.
I assum you worked with some statically-typed language in Visual Studio (C#
, C++
etc.). Members of variables in those languages are known at compile-time - that's the reason you can have useful tools providing you with that kind of interesting information.
If you want to know all the members of your variables before running the program in Matlab, there are two ways to do this:
Upvotes: 1