Simulating model in command window without using workspace.
1 次查看(过去 30 天)
显示 更早的评论
1. I want to simulate the model using sim method. I have parameters and corresponding values to be simulated. But i dont know how to give these values to sim method. we dont want to create the parameter and their values in workspace. How to explicitly specify these parameter and values to sim method.
2. I want to know the names of the parameter used in the model. Which method is used to get those parameter names.
0 个评论
回答(2 个)
Nirmal Gunaseelan
2011-7-7
1. If I understand your question right, by parameters you mean variables that you have specified in the model's block parameters. These values have to be in the workspace when the model is simulated. If you did not want them to be present initially and want the model to be self contained, then you could create them on the fly when loading the model using Callback functions and delete them when exiting the model.
2. To find out variables that your model depends on in the workspace, you could perform a Model dependency check.
2 个评论
Nirmal Gunaseelan
2011-7-7
1. You could either declare and define variables in some script and call it in the callback or load a MAT file containing these.
2. Manifest does give you a list of variables - check the doc page.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!