Find variable in Simulink blocks
Show older comments
In a Simulink model 'myModel', I would like to find all blocks that use the variable 'myVariable', even before the variable's value exists in the workspace. The variable appears in several constant blocks, which I want to highlight. But the following approach produces the error below. What am I doing wrong?
Simulink.findVars('myModel', 'Name', 'myVariable')
Model 'myModel' failed to successfully compile, any cached results may be incomplete.
Caused by: Error evaluating expression 't_total' for 'Stop time' specified in the Configuration Parameters dialog for block diagram 'myModel': Undefined function or variable 't_total'.
Accepted Answer
More Answers (0)
Categories
Find more on Simulink Functions in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!