필터 지우기
필터 지우기

Simulating model in command window without using workspace.

조회 수: 4 (최근 30일)
Sadanand
Sadanand 2011년 7월 7일
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.

답변 (2개)

Nirmal Gunaseelan
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
Sadanand
Sadanand 2011년 7월 7일
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 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.

댓글을 달려면 로그인하십시오.


Paulo Silva
Paulo Silva 2011년 7월 7일

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by