Viewing derived parameter in simscape in-order to debug

2 次查看(过去 30 天)
Hi,
I have some derived parameters declared in my custom component in simscape . I want to view the value in-order to check if my equations are correct. I do not want to make it variable. Is there a easy way to view the derived parameter value? Something similar to sscexplore ?

回答(1 个)

Pavel Dey
Pavel Dey 2016-6-7
I don't think there is a direct way of logging the parameters like the signals. Since you are using a custom component and the parameter is changing during the simulation, I believe it is changing based on certain input. So you may log that input signal and find out the value of the parameter by applying the same logic you have used inside the block.
Another way of getting that using a get_param method. If the parameter is a run-time parameter, you may make queries for that parameter at every time step. You may use a MATLAB function block to do that.
However, I will not recommend you to follow this method as this is a bad way of doing this. If the first method works for you, that may be better.

类别

Help CenterFile Exchange 中查找有关 Troubleshooting 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by