view usage of parameters in model.mld
7 views (last 30 days)
Hy to all
I have a question please.
I use my_params.mat for my_params.mdl. How can I see what parameters from my_params.mat are not used in my_params.mdl. Because if there are no parameters used I need to delete them.
Any ideea? Is it ok to use textscan? I do not know exactly how but is this a start?
Fangjun Jiang on 8 Sep 2011
I am not aware of a direct or effective way doing it. How many parameters are there in the .mat file? If not many, you can clear one at a time and then do ctrl+D to update the model, if the parameter is used by the model, it will report an error since it's now cleared. Of course, this will not be practical if there are many parameters.
When setting parameters for a model file, .m file is usually used. Using .m file could also add unneeded parameters if proper "house-keeping" is not maintained. The problem for using .mat file to store parameters for a model file is, people usually use save() after model development or simulation to save the .mat file, it is more often that unneeded parameters in the workspace will be put in the .mat file.