Reputation: 2710
I'm writing a function that uses linmod
but I get many undefined variables errors. Those variables are defined in the function scope but I guess linmod
wants them in the global workspace. In sim
you can set the SrcWorkspace
to current
and use it in a function scope. Is there something similar for linmod
?
Upvotes: 1
Views: 224
Reputation: 10762
The error you are receiving should have a hyperlink to the line of code (most likely in the function dlinmod) where the error occurs. This will show that the model is being executed using an feval statement (not sim). Hence the model will be looking in the Model Workspace, then the Base Workspace for its parameters.
You'll need to set up your model to get its data from one of those 2 locations.
Upvotes: 1