Filter löschen
Filter löschen

Simulating model in command window without using workspace.

4 Ansichten (letzte 30 Tage)
Sadanand
Sadanand am 7 Jul. 2011
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.

Antworten (2)

Nirmal Gunaseelan
Nirmal Gunaseelan am 7 Jul. 2011
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 Kommentare
Sadanand
Sadanand am 7 Jul. 2011
Thank you so much for ur response.
I am still left with the following queries.
1. When Callback function is used to load variables into workspace, variables have to be defined in .m file. How to specify values for these variables.
2. Model dependency check creates manifest file with which we can get toolbox dependency etc. but i need variable names present in model file before simulation starts.
Thanks in advance.
Nirmal Gunaseelan
Nirmal Gunaseelan am 7 Jul. 2011
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.

Melden Sie sich an, um zu kommentieren.


Paulo Silva
Paulo Silva am 7 Jul. 2011

Kategorien

Mehr zu Modeling finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by