Skip to content

Commit 3c728a3

Browse files
docs: add parse_variable to documentation
1 parent 8712f99 commit 3c728a3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/src/basics/FAQ.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,16 @@ parameter_index(sys, sym)
8282
Note that while the variable index will be an integer, the parameter index is a struct of
8383
type `ParameterIndex` whose internals should not be relied upon.
8484

85+
## Can I index with strings?
86+
87+
Strings are not considered symbolic variables, and thus cannot directly be used for symbolic
88+
indexing. However, ModelingToolkit does provide a method to parse the string representation of
89+
a variable, given the system in which that variable exists.
90+
91+
```@docs
92+
ModelingToolkit.parse_variable
93+
```
94+
8595
## Transforming value maps to arrays
8696

8797
ModelingToolkit.jl allows (and recommends) input maps like `[x => 2.0, y => 3.0]`

0 commit comments

Comments
 (0)