I want to collect all the block parameters of the multiple simulink model as per the user select the model and print it in Excel file

1 次查看(过去 30 天)
Hello All, I want to collect the parameters of Multiple Simulink Model, model must be selected by user (like using uigetfile) and print all the collected data into Excel sheet. Script should be dynamic no hard coded, your support will be appreciated. Thank you

回答(1 个)

Suman
Suman 2024-9-23
Hi Aditya,
You can use the uigetfile function to select the model files for which you want to extract the parameters. Make sure the model name is same as the filename of the models.
Once you have done that, you can loop through the selected files and use the get_param function to get the model parameters as shown here: https://in.mathworks.com/help/simulink/slref/get_param.html#mw_cbf712c7-8705-428e-9a20-8b1ee41d36af
Finally, use the cell2table and writetable functions to convert the parameters cellarray to table and write that to an Excel file.

类别

Help CenterFile Exchange 中查找有关 Simulink Environment Customization 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by