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

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.

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 18 Nov. 2013

0 Stimmen

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.

1 Kommentar

Calin O
Calin O am 18 Nov. 2013
It worked if I passed it to the fct as an argument. Thanks.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by