- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Variable Filtering for array type of...
Variable Filtering for array type of variables
Variable Filtering for array type of variables
Hi,
During the simulation of Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum, I was trying to filter out some of the variables using the Simulation GUI>Output>Variable Filter option.
When I try to filter out the variable body.a_0[1], the filtering fails.
In fact even searching for the same variable in the Variable browser fails to show the variable.
Please guide on how to use variable filtering for such kind of variables
Re: Variable Filtering for array type of variables
The filtering works. If you give Simulation->Output->Variable Filter: body.a_0[1]
then it will NOT put these variables in the .mat file, that's why you cannot find it in the Variable Browser.
Note also the the Variable Filter is an regular expression which if it matches it will NOT put these variables in the .mat file.
- adrpo
- 885 Posts
Re: Variable Filtering for array type of variables
No, if the variableFilter matches a variable, it *will* be in the result file. But it is a regular expression, and the above matches body.a_01 since [1] is equivalent to 1.
- sjoelund.se
- 1700 Posts
Re: Variable Filtering for array type of variables
Of course. Read up on regular expressions. You will be happy you did. Easiest way should be to just use a_0[[]1[]] or a_0.1. as the string.
- sjoelund.se
- 1700 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Variable Filtering for array type of...