Undefined variable "database1" or class "database1.X"

1 view (last 30 days)
I am working with a database , which is a struct , which I load in the workspace . When I am referring to a class database1.X, I have the error " Undefined variable "database1 " or class " database1.X ""
The loaded database does exist in the workspace. Even the command " exist database1" works fine, and returns 1.
Have any idea?
Thanks.

Accepted Answer

Walter Roberson
Walter Roberson on 18 Nov 2013
Perhaps the variable is in a different workspace than where you are trying to use it. For example perhaps you loaded it into the base workspace, but are trying to use it inside a function without passing it in to the function.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!